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 

Kicking and Banning users that match a ban.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 5:07 am    Post subject: Kicking and Banning users that match a ban. Reply with quote

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:
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. Rolling Eyes but didn't seem to work so much.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 28, 2007 8:42 am    Post subject: Reply with quote

So what's the actual problem?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 10:11 am    Post subject: Reply with quote

lol sorry thought it was clear, looking for more ways to kick and ban people that match bans.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 28, 2007 12:29 pm    Post subject: Reply with quote

What's wrong with your current way?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 1:08 pm    Post subject: Reply with quote

Embarassed 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 Rolling Eyes 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.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 28, 2007 8:35 pm    Post subject: Reply with quote

You should add ":" before the reason (otherwise only the first word appears as the reason).
Code:
putquick "KICK $c $target :$reason"

Frankly, I'm not understanding what's your problem. So please try to be more clear.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Dec 28, 2007 9:12 pm    Post subject: Reply with quote

Sorry for the missunderstandings Sad
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. Crying or Very sad
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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