Code: Select all
bind mode - "* -o" deop:prot
proc deop:prot {nick uhost hand chan mode target} {
global botnick
if {(![channel get $chan paranoid]) || ([string equal -nocase $botnick $nick]) || ([string equal -nocase $target $nick]) || ([matchattr $hand o|o $chan])} { return 0 }
if {([string match "*-o*" $mode]) && ($target == "$botnick")} {
putquick "PRIVMSG [cserve $chan] :chanlev $chan $nick -aovgm"
putquick "PRIVMSG [cserve $chan] :deopall $chan"
putserv "MODE $chan +b [maskhost [getchanhost $nick $chan]]" -next
putserv "KICK $chan $nick :Do not abuse your op!" -next; return 0
} elseif { ([string match "*-o*" $mode]) && ($target != "")} {
putquick "MODE $chan -o+b+o $nick [maskhost [getchanhost $nick $chan]] $target" -next
putquick "KICK $chan $nick :Do not abuse your op." -next; return 0
}
}
proc cserve {chan} {
if {[onchan Q $chan]} {return "Q"} elseif {[onchan L $chan]} {return "L"} else {return ""}
}
Code: Select all
[22:57:07] * rd^ sets mode: -o Q13
[22:57:07] * xs4all.nl.quakenet.org sets mode: -oooooo rd^ HauKKa` diabolikal v1per MeTroiD fishbot
[22:57:07] * xs4all.nl.quakenet.org sets mode: -o L
[22:57:07] * xs4all.nl.quakenet.org sets mode: +o L
[22:57:07] * L sets mode: +o Q13
[22:57:08] * Q13 sets mode: +b rd^!*@*
[22:57:08] * Info: This rd^!*@* ban affects rd^
[22:57:08] * L sets mode: +o MeTroiD
[22:57:08] -L- Done.
[22:57:11] * Q13 sets mode: +b L!*@*
[22:57:11] * Info: This L!*@* ban affects @L
[22:57:19] * Q13 sets mode: +b fishbot!*@*
Code: Select all
bind mode - "-*o*" deop:prot
proc deop:prot {nick uhost hand chan mode target} {
global botnick
if {(![channel get $chan paranoid]) || ([string equal -nocase $botnick $nick]) || ([string equal -nocase $target $nick]) || ([matchattr $hand o|o $chan]) || (![string match "*-o*" $mode])} { return 0 }
if {([string match "*-o*" $mode])} && ([string equal -nocase $botnick $target]) && (![string equal "L" $nick])} {
putquick "PRIVMSG [cserve $chan] :chanlev $chan $nick -aovgm"
putquick "PRIVMSG [cserve $chan] :deopall $chan"
putquick "MODE $chan -o+b $nick [maskhost [getchanhost $nick $chan]]" -next
putquick "KICK $chan $nick :Do not abuse your op!" -next; return 0
}
}
proc cserve {chan} {
if {([onchan Q $chan])} { return "Q" }
elseif {([onchan L $chan])} { return "L" }
else { return "" }
}