Code: Select all
if {$numversion < 1040200} {
if {[info commands isop] != ""} {
proc wasop {nick chan} {
return [isop $nick $chan]
}
}
}
proc sb_bitch {nick uhost hand chan mode opped} {
global botnick sb_chans sb_canop sb_canopany sb_canopflags sb_checkop sb_note sb_remove
if {$mode == "+o"} {
if {$nick != $botnick} {
if {((($opped != $botnick) && ($nick != $opped) && ([onchan $nick $chan]) && (![wasop $opped $chan])) && (($sb_chans == "") || ([lsearch -exact $sb_chans [string tolower $chan]] != -1)))} {
if {![matchattr [nick2hand $opped $chan] $sb_canopflags $chan]} {
if {(($sb_canopany == "") || (![matchattr $hand $sb_canopany $chan]))} {
putquick "KICK $chan $opped :Permission Denied"
putquick "KICK $chan $nick :Permission Denied"
if {(($sb_remove) && ([validuser $hand]) && ([matchattr $hand o|o $chan]))} {
chattr $hand -o+d|-o+d $chan
if {[info commands sendnote] != ""} {
foreach recipient $sb_note {
if {[validuser $recipient]} {
sendnote SUPERBITCH $recipient "Permission Denied"
}
}
}
}
}
} else {
if {((($sb_canopany == "") || (![matchattr $hand $sb_canopany $chan])) && (($sb_canop == "") || (![matchattr $hand $sb_canop $chan])))} {
putquick "KICK $chan $opped :Permission Denied"
putquick "KICK $chan $nick :Permission Denied"
if {(($sb_remove) && ([validuser $hand]) && ([matchattr $hand o|o $chan]))} {
chattr $hand -o+d|-o+d $chan
if {[info commands sendnote] != ""} {
foreach recipient $sb_note {
if {[validuser $recipient]} {
sendnote SUPERBITCH $recipient "Permission Denied"
}
}
}
}
}
}
}
} else {
if {(($sb_checkop) && (![matchattr [nick2hand $opped $chan] o|o $chan]))} {
putquick "KICK $chan $opped :Permission Denied"
putlog "Permission Denied"
}
}
}
return 0
}
set sb_chans [split [string tolower $sb_chans]] ; set sb_note [split $sb_note]
bind mode - * sb_bitch