perhaps add an alias to return the selected word or nick. (Custom identifier).
Here is a the code I would recommend:
alias $selectword {
if (%selword == $null) {
set %selword $?=\"Enter word or nick to log.\"
}
else {
return %selword
}
}
And you can make the on *:TEXT event to:
on :TEXT::*:{
if ($selectedword isin $1-) etc.
This makes it so that you can set the word or nick via /set %selword .