egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Remove username on massban

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
samhain
Halfop


Joined: 03 Jan 2007
Posts: 77

PostPosted: Sat Aug 21, 2010 4:27 pm    Post subject: Remove username on massban Reply with quote

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.
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sun Aug 22, 2010 2:01 pm    Post subject: Reply with quote

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:

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber