mIRC Home    About    Download    Register    News    Help

Print Thread
nickname cap check #169873 30/01/07 12:43 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
i wanna test wther a nickname is all capital letters only

like JOHN

jOHN would not be the case as j is smallcase

anyone got a snippet for this? im not sure but i guess this could be quite small using regex?

Re: nickname cap check [Re: pouncer] #169874 30/01/07 01:06 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
No need for regex.

/help isupper
/help islower

Code:
if ($nick isupper) { do this }


Now, I do believe (and can't check right now) that isupper will also be true if you have numbers/symbols mixed in:

MARK12 = $true

If you want to not count that as a match, look into:

/help isalpha


Invision Support
#Invision on irc.irchighway.net
Re: nickname cap check [Re: pouncer] #169875 30/01/07 01:06 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
isupper text contains only upper case letters

if ($nick isupper)

lol beat me by 16 seconds!

Last edited by DJ_Sol; 30/01/07 01:07 AM.
Re: nickname cap check [Re: DJ_Sol] #169876 30/01/07 01:08 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Lol. smile


Invision Support
#Invision on irc.irchighway.net