Quote:
Originally Posted by HamletEagle
No. You are checking if the password is empty(strlen < 1 means the string has 0 characters) => no password. The check should be reversed, meaning strlen >= 1 or simply check if first char is not EOS, as suggested before.
This:
PHP Code:
set_cvar_string("sv_password","");
Should be
PHP Code:
set_pcvar_string(emptypass, "");
You already got the cvar pointer, so no reason to use the slow set_cvar_* natives.
PHP Code:
ColorChat(0, RED, "%s Password has been removed.", TAG);
Isn't this totally useless? It will be displayed when the server is empty - no one can see the message.
|
1. Wow, thanks, I've put emptypass instead of sv_password
2. Yeah, I removed the ColorChat line as well, it was just for debugging purposes, edited it into being a console (and log) message.
Thanks, HamletEagle!
__________________