not really a scripter, so ALL comments, and criticism is welcome..
but it's aliases for voice protect owner etc.
alias protect {
.mode $chan +ao $$1 $$1 }
alias deprotect {
.mode $chan -ao $$1 $$1 }
alias voice {
.mode $chan +v $$1 }
alias devoice {
.mode $chan -v $$1 }
alias all {
.mode $chan +qaohv $$1 $$1 $$1 $$1 $$1 }
alias deall {
.mode $chan -qaohv $$1 $$1 $$1 $$1 $$1 }
This simply will not work on some networks, as you will get messages similar to this:
A better way would be to do it via ChanServ, with the following aliases:
alias owner { /msg ChanServ OWNER $chan }
alias deowner ( /msg ChanServ DEOWNER $chan }
alias protect { /msg ChanServ PROTECT $chan $1 }
alias deprotect { /msg ChanServ DEPROTECT $chan $1 }
alias op { /msg ChanServ OP $chan $1 }
alias deop { /msg ChanServ DEOP $chan $1 }
alias halfop { /msg ChanServ HALFOP $chan $1 }
alias dehalfop { /msg ChanServ DEHALFOP $chan $1 }
NOTE: Owner mode usually doesnt allow opping others, but Protect downwards will do, to op someone else, its a case of putting thier name after the command, example: /protect nick, /op nick etc. This will only work if you have rights under ChanServ to give other people op rights though.
don't really see the point in checking if $$1 ison:P napa, I did that to avoid typo. But yeah it ain't needed. I roughly wrote up the code without giving it much of a thought. :P But the thing is, it works.> also Jethro_ where are you using var %s ?Whoopsie daisy... the var %s was left there by accident because I was gonna include your suggestion in the code, but then I backed down. :P
You can do something as such:
alias cmd {
var %r /((de)?(protect|voice))/iS, %2 $iif($$2 ison #,$v1)
if $regex($$1-,%r) {
$iif($replace($regml(1),protect,+ao,voice,+v),mode # $v1 %2 %2)
$iif($replace($regml(1),de,-,protect,ao,voice,v),mode # $v1 %2 %2)
}
}
alias all { mode # +qaohv $str($iif($$1 ison #,$v1) $chr(32),5) }
alias deall { mode # -qaohv $str($iif($$1 ison #,$v1) $chr(32),5) }
For protect, deprotect, voice, devoice, do /cmd NICKHERE
For the all and deall, you do the usual.