| View previous topic :: View next topic |
| Author |
Message |
mindcry Voice
Joined: 05 Mar 2007 Posts: 10 Location: Central Java Indonesia
|
Posted: Tue Jun 19, 2007 7:16 pm Post subject: improper banmask |
|
|
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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jun 19, 2007 7:56 pm Post subject: |
|
|
Refer Bans post by user. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Jun 20, 2007 5:45 am Post subject: |
|
|
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 |
|
 |
mindcry Voice
Joined: 05 Mar 2007 Posts: 10 Location: Central Java Indonesia
|
Posted: Wed Jun 20, 2007 7:00 am Post subject: |
|
|
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.  _________________ mindcry |
|
| Back to top |
|
 |
|