mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[server] Implement ServerPasswordChanged
This commit is contained in:
parent
2cdb6c02fd
commit
be23b93702
@ -132,7 +132,19 @@ int GetCookieLogging()
|
||||
|
||||
void ServerPasswordChanged()
|
||||
{
|
||||
// TODO: ServerPasswordChanged
|
||||
if (pNetGame)
|
||||
{
|
||||
char* szPass = pConsole->GetStringVariable("password");
|
||||
if ((szPass) && (szPass[0] != 0) && (szPass[0] != '0'))
|
||||
{
|
||||
logprintf("Setting server password to: \"%s\"", szPass);
|
||||
pNetGame->GetRakServer()->SetPassword(szPass);
|
||||
} else {
|
||||
logprintf("Server password has been removed.");
|
||||
pConsole->SetStringVariable("password", "");
|
||||
pNetGame->GetRakServer()->SetPassword(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user