; ------------------------------- ; ------------ AV --------------- ; ------------------------------- on *:JOIN:#:{ if ($istok(%av,$chan,32)) && ($me isop $chan) { mode $chan +v $nick } } ; ------------------------------- on *:TEXT:!av*:#:{ if ($nick isop $chan) && ($istok(%av,$chan,32)) && (!$2) { scid $rand(1,7) notice $nick AutoVoice in $chan is ON. Cmds: !av on and !av off. I must be opped in channel to give anyone voice. } elseif ($nick isop $chan) && (!$istok(%av,$chan,32)) && (!$2) { scid $rand(1,7) notice $nick AutoVoice in $chan is OFF. Cmds: !av on and !av off. I must be opped in channel to give anyone voice. } elseif ($nick isop $chan) && (!$istok(%av,$chan,32)) && ($2 == on) && ($me !isop $chan) { scid $rand(1,7) notice $nick OK, but first you have to op me. Op me and use this command again. } elseif ($nick isop $chan) && (!$istok(%av,$chan,32)) && ($2 == on) && ($me isop $chan) { scid $rand(1,7) notice $nick AutoVoice in $chan is now set to ON. set %av $addtok(%av,$chan,32) } elseif ($nick isop $chan) && ($istok(%av,$chan,32)) && ($2 == off) { scid $rand(1,7) notice $nick AutoVoice in $chan is now set to OFF. set %av $remtok(%av,$chan,32) } elseif ($nick isop $chan) && ($istok(%av,$chan,32)) && ($2 == on) && ($me isop $chan) { scid $rand(1,7) notice $nick AutoVoice in $chan is already set to ON. } elseif ($nick isop $chan) && ($istok(%av,$chan,32)) && ($2 == on) && ($me !isop $chan) { scid $rand(1,7) notice $nick AutoVoice in $chan is already set to ON, but I'm not opped here, so i can't give voice :-( } elseif ($nick isop $chan) && (!$istok(%av,$chan,32)) && ($2 == off) { scid $rand(1,7) notice $nick AutoVoice in $chan is already set to OFF. } }