#put here the channel that the bot must protect
set prochan "#loldelol"
bind mode - *-o* deop
proc deop {nick uhost hand chan args} {
global botnick home servicename prochan
set dnick [lindex $args 1]
if {$chan == $prochan} {
if {$dnick == $botnick} {
putserv "NOTICE $nick :your deop of the bot has been logged !!"
putchan $home "$nick deoped me on $chan" }
if {$nick == $botnick} {
putchan $chan "i'm sorry i have to do this ..." } else {
putserv "MODE $chan -o $nick"
putserv "MODE $chan +o $dnick" }
} else {
return 1 }
return 1
}
bind mode - *+o* op
proc op {nick uhost hand chan args} {
global botnick home servicename prochan
set dnick [lindex $args 1]
if {$chan == $prochan} {
if {$dnick == $botnick} {
putchan $chan "wel i can't say no ... tnx dude !"
return 1 }
if {$nick == $botnick} {
putchan $chan "now say tnx !!!" } else {
putserv "MODE $chan -o $dnick" }
} else {
return 1 }
return 1
}"
not sure what you mean about the m|m thing, but for the channel thing you need to remeve the '$chan == $prochan' condition. in case you want masters to be not logged/punished replace '$chan == $prochan' with '![matchattr $hand m|m $chan]'.
tags, otherwise whitespaces are beeing collapsed by the web browser that destroys code formating.
PPS: the code is ugly anyway, you shouldn't learn from such :D.