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.

improper banmask

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
mindcry
Voice
Posts: 10
Joined: Mon Mar 05, 2007 10:24 am
Location: Central Java Indonesia

improper banmask

Post by mindcry »

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: Select all

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Refer Bans post by user.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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: Select all

if {[regexp {^\*+(!\*)?(@\*)?(\.\*)*$} $arg]} {
#kick evil user
}
NML_375
m
mindcry
Voice
Posts: 10
Joined: Mon Mar 05, 2007 10:24 am
Location: Central Java Indonesia

Post by mindcry »

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. :D
mindcry
Post Reply