This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Remove username on massban

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
samhain
Halfop
Posts: 77
Joined: Wed Jan 03, 2007 5:19 am

Remove username on massban

Post by samhain »

Hi I need a simple tcl if a user bans *!*@* from X username I mean mass ban which is popular on undernet
/msg X ban #channel *!*@*
then the bot should remove that username immidiately from the channel.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Since it can't detect who placed the ban unless the bot is kicked by X, the next piece of code will do just that: when kicked tough X it will tell it to remove the user from it's channel user list.

Code: Select all

bind kick * * my:kick

proc my:kick {nick uhost hand chan vict reas} {
if {![isbotnick $vict] || $nick != "X"} return
 set kicker [string trim [lindex [split $reas] 0] {()}]
 putquick "PRIVMSG X :REMOVE $chan $kicker" -next
}
Once the game is over, the king and the pawn go back in the same box.
Post Reply