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 

improper banmask

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


Joined: 05 Mar 2007
Posts: 10
Location: Central Java Indonesia

PostPosted: Tue Jun 19, 2007 7:16 pm    Post subject: improper banmask Reply with quote

i have a problem in my tcl, if ops banning *[*[*!*@* my bot will detect it as *!*@* (massban) and also if ops banning *[a]*!*@* my bot will detect it as *a*!*@* ; how we can solve this thing? anyone can help me?

here are some code i try to make to solve the problem:
Code:

if {[string match $arg "*!*@*"] || [string match $arg "*!*@*.*"] || [string match $arg "*!*@*.*.*"]} {
if {([regexp -all {\[|\]|\^|\\|\||\?} $arg] == 0)  && ![isbotnick $nick] && ![matchattr $hand n $chan]} { kick nick....


is this correct code or anybody can makes proper detection for massban mask? pls help me... thx before...
_________________
mindcry
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Jun 19, 2007 7:56 pm    Post subject: Reply with quote

Refer Bans post by user.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Jun 20, 2007 5:45 am    Post subject: Reply with quote

See the linked post for information on repairing whatever script you have that detects bans improperly.

As for detecting massbans, I'd say first off, you're using the wrong order of arguments in your string match (it's "string match <pattern> <string>"). But since you really don't want any wildcard matching (you just wish to know wether the ban actually is *!*@*, not wether it matches it), you'd be better off using "string compare".

Might be able to simply use this regular expression instead?
Code:
if {[regexp {^\*+(!\*)?(@\*)?(\.\*)*$} $arg]} {
#kick evil user
}

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
mindcry
Voice


Joined: 05 Mar 2007
Posts: 10
Location: Central Java Indonesia

PostPosted: Wed Jun 20, 2007 7:00 am    Post subject: Reply with quote

awesome, your code is working.. im currently testing it in DALnet network,
currently making some mode lock just as chanserv did (example +nt-pk) and this massban protection is a part of it... thank you very much. Very Happy
_________________
mindcry
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