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.

how to make ignore case sensitive nicks

Old posts that have not been replied to for several years.
Locked
N
Nexus6
Op
Posts: 114
Joined: Mon Sep 02, 2002 4:41 am
Location: Tuchola, Poland

how to make ignore case sensitive nicks

Post by Nexus6 »

Hello, some spam bots use specific nicks, and these nicks contain strings, the bots which I want to keep out use only nicks without special chars, and without caps, example of such nick: mxjklz and if I make bot check nicks on join and check if they nick don't contain specific spam bot strings: {[string match "*mx*" $nick]} {....proc here, mxjklz gets banned but for example Nickmx would get banned too, and it's case sensitive nick so it ain't one of the bots I want to be banned.
I want bot do nothing if a nick contains caps/special chars/numbers.

I'd be grateful if someone enlighted me :)
Thanks in advance,
Nexus6
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

1) Check if it is a mixture of lower and upper case chars:

if {$nick == [string tolower $nick]} {... $nick is all lowercase}

2) String match will not match blah against BlAh unless you used -nocase switch.

3) Provide more info on what will be your merits to determine unallowed nick.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

what you suggest for nicks that gave } | ^ - and other like this?
N
Nexus6
Op
Posts: 114
Joined: Mon Sep 02, 2002 4:41 am
Location: Tuchola, Poland

Post by Nexus6 »

User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

You meen if {[regexp "^\[a-zA-Z\]{[string len $nick]}" $nick]} { nick has only upper and lowercase letters...} ?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I've tryed [string tolower $nick] but I didn't get the proper results. I'll try your sugestion to, if this is the one.
Locked