View Single Post
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 01-13-2019 , 11:44   Re: Removing pass get_playersnum()
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
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(0RED"%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!
__________________
deprale is offline