unset %spy
unset %spy.nick
unset %spy.relayCan simply be changed to:
unset %spy*
will get all the %spy variables unset respectively.
You don't need the halts.
And you can make an alias to save yourself the unneeded repetition of a routine.
on *:TEXT:*:?:spy $1-
on *:ACTION:*:?:spy $1-
alias -l spy {
if ($nick == %spy.nick) {
.msg %spy.relay $+($chr(3),10,<,$chr(3),7,$nick,$chr(3),10,>) $+($chr(3),7,$$1-)
}
}