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.

Kicking and Banning users that match a ban.

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Kicking and Banning users that match a ban.

Post by TCL_no_TK »

I've been trying to find an easer way to kick all users matching a bans thats adding to the bot via a public command. So far as i've trying to not let the command set global bans only channel bans. I've used this code to check for matches, then kick and ban them before setting an actuall ban on the banmask.

Code: Select all

foreach c [channels] {
 putquick "MODE $c +b $banmask"
   foreach target [chanlist $c] {
    if {[string match -nocase "$banmask" "$target![getchanhost $target]"]} {
     putquick "KICK $c $target $reason"
    }
   }
    newchanban $c $banmask $nick "$reason" [expr ($expire/60)]m none
}
I thought it would be more easyer to reset the channel information. :roll: but didn't seem to work so much.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

So what's the actual problem?
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

lol sorry thought it was clear, looking for more ways to kick and ban people that match bans.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What's wrong with your current way?
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

:oops: people that matched the ban are being kicked without the origional ban reason, or the bot slows down after too many matches. Its enforcing the right ban bascly with the wrong reason :roll: I've been trying to get it use its normal way, like it would with the dcc commands. since i dont have to worrie about it when its doing it that way. *sigh* Its pretty troublesome to tell ya thruth, was wondering if anyone had a simpler way of doing it. :arrow: origional post.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You should add ":" before the reason (otherwise only the first word appears as the reason).

Code: Select all

putquick "KICK $c $target :$reason"
Frankly, I'm not understanding what's your problem. So please try to be more clear.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Sorry for the missunderstandings :(
I was looking for other ways to kick and ban people in the eggdrop's channels that match bans. Other than the way i've done it.

P.S this post is dragging on alot, sorry for any inconveniances. :cry:
Post Reply