Quote:
Originally Posted by Konstantinos
In the IRC command, check if the new name is valid:
PHP код:
IsValidName(const p_name[]) { for (new i, j = strlen(p_name); i != j; i++) { switch (p_name[i]) { case '0' .. '9', 'A' .. 'Z', 'a' .. 'z', '[', ']', '(', ')', '$', '@', '.', '_', '=': continue; default: return 0; } } return 1; }
|
Oh my, that just worked perfectly. I've been trying to find something like this from past few hours. Thanks a lot!
Quote:
Originally Posted by Meller
Okay, This is just a tip:
Don't make blacklists, Make whitelists.
So much better and shorter.
|
Ehm, what?