mIRC Home    About    Download    Register    News    Help

Print Thread
help with invalid nick charecters please?? #99793 05/10/04 03:38 PM
Joined: Jun 2004
Posts: 291
W
whatsthedillio Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
i want a script or if theres an identifier or regex or something
that will check if the nick typed like
input nick the input was "bla" it would return $true
or something
if it was "./@"it would return $false so it could see the charecters
that arnt aloud in nicknames

hope that was clear
smile

please help me
thanks alot

Re: help with invalid nick charecters please?? #99794 05/10/04 03:44 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The precise characters that are allowed in nicknames varies between networks.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: help with invalid nick charecters please?? #99795 05/10/04 03:48 PM
Joined: Jun 2004
Posts: 291
W
whatsthedillio Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
is there any way i can make an alias then that will canel out charecters:
anything that isnt plain text numbers or []()_-~|

thanks
smile

Re: help with invalid nick charecters please?? #99796 06/10/04 02:12 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You mean remove them? This should do the trick:

Code:
strip_invalid_chars {
  var %r
  !.echo -q $regsub(strip_invalid_chars, $$1, /[^][a-z0-9()_~|-]/g, , %r)
  return %r
}


ie.
$strip_invalid_chars(hello~ @there\) returns: hello~there


Spelling mistakes, grammatical errors, and stupid comments are intentional.