mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 291
W
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

Joined: Dec 2002
Posts: 2,962
S
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.
Joined: Jun 2004
Posts: 291
W
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

Joined: Dec 2002
Posts: 2,962
S
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.

Link Copied to Clipboard