Well, one part of this is easy, and the other not.JanisB wrote:hello, i have another question about `BotIsChanServ` theme:
how i can close/suspend channel? e.g.: +b *!*@* : I'm not going to ban myself.
How i can override this protection, because my bot is ircop, and he can use /sajoin to get himself into channel.
Code: Select all
#Channel to close
set closechan "#yourchannel"
#Your nick to exempt
set exemptnick "god"
#Your mask to exempt
set exemptmask "oper@63.147.*"
bind join - "*" close:channel
proc close:channel {nick uhost hand chan} {
global closechan exemptnick exemptmask
if {([isbotnick $nick]) || ([string match -nocase
*$exemptnick* $nick]) || ([string match -nocase *$exemptmask* $uhost]) || (![string equal -nocase $closechan $chan])} { return 0 }
putquick "MODE $chan +b *!*@*" -next
putquick "KICK $chan $nick :This channel has been closed by ChanServ." -next
return 0
}