on *:TEXT:!av on:#: {
if ($nick isop $chan || $nick ishop $chan) {
/set %av. [ $+ [ $chan ] ] on
/msg $chan 0,1[»»] 13AutoVoice has been set on for $chan 0,1[««]
}
else {
/notice $nick U are no operator or half-operator in $chan
}
}
on *:JOIN:#: {
if (%av. [ $+ [ $chan ] ] == on) {
/mode $chan +v $nick
}
elseif (%av. [ $+ [ $chan ] ] == off) { HALT }
}
on *:TEXT:!av off:#: {
if ($nick isop $chan || $nick ishop $chan) {
/set %av. [ $+ [ $chan ] ] off
/msg $chan 0,1[»»] 13AutoVoice has been set off for $chan 0,1[««]
}
else {
/notice $nick U are no operator or half-operator in $chan
}
}
alias avon {
/set %av. [ $+ [ $chan ] ] on
/echo -e Autovoice setten on for $chan
}
alias avoff {
/set %av. [ $+ [ $chan ] ] off
/echo -e Autovoice setten off for $chan