# Suspend
proc kick:extract {nick uh hand chan vict reas} {
global botnick
if {$nick != "X"} { return }
set kicker [string trim [lindex [split $reas] 0] {()}]
if {$vict == $botnick} {
putserv "PRIVMSG X :suspend $chan ${kicker} 7 d 340" }
return }
# Unban
proc xstuff:ban {nick uhost hand chan mc ban} {
global botnick botname
set bmask "*!*@[lindex [split $uhost @] 1]"
if {[string match "$ban" "$botname"] && [botisop $chan]} {
if {[string match "$bmask" "$botname"]} { set bmask [maskhost *!*[string trimleft $uhost ~]]}
putserv "MODE $chan -bo+b $ban $nick $bmask"
putserv "KICK $chan $nick :Not Allowed - Banning Service Bot" }
return }
By using this script, someone who kick or ban channel bot (eggdrop) using X on undernet.org will get suspend. Here, how to add if someone deop the bot (eggdrop) using X? In other word, if someone deop the bot using X, he/she will also get suspended.
# Suspend
proc kick:extract {nick uh hand chan vict reas} {
if {$nick == "X" && [isbotnick $vict]} {
set kicker [string trim [lindex [split $reas] 0] {()}]
putserv "PRIVMSG X :suspend $chan $kicker 7 d 340"
}
}
# Unban
proc xstuff:ban {nick uhost hand chan mc ban} {
global botnick botname
if {![string match -nocase $ban $botname] || ![botisop $chan]} {
return
}
set bmask "*!*@[lindex [split $uhost @] 1]"
if {[string match "$bmask" "$botname"]} {
set bmask [maskhost *!*[string trimleft $uhost ~]]
}
putserv "MODE $chan -bo+b $ban $nick $bmask"
putserv "KICK $chan $nick :Not Allowed - Banning Service Bot"
}
If you intend or use the x(channels) variable to *mark* the channels where you want a specific thing to happen better use setudef (check the doc files), as for the on-deop a "bind mode" should do the trick.
Once the game is over, the king and the pawn go back in the same box.
Yeah, I think it is from xstuff.tcl.. I don't remember it coz I've remove some unneeded proc for my customization.. Argh, can you give direct foward example.. cause I'm really busy to read a README.. hehe.