Allow localization of name-reserved kick message (bug 5146, r=asherkin).

This commit is contained in:
Nicholas Hastings 2013-04-08 08:00:13 -04:00
parent fff17f8043
commit 283f1f012d
2 changed files with 8 additions and 1 deletions

View File

@ -939,7 +939,9 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
{ {
if (!CheckSetAdminName(client, pPlayer, id)) if (!CheckSetAdminName(client, pPlayer, id))
{ {
pPlayer->Kick("Your name is reserved by SourceMod; set your password to use it."); char kickMsg[128];
logicore.CoreTranslate(kickMsg, sizeof(kickMsg), "%T", 2, NULL, "Name Reserved", &client);
pPlayer->Kick(kickMsg);
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
} else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) { } else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {

View File

@ -78,6 +78,11 @@
"en" "No Vote" "en" "No Vote"
} }
"Name Reserved"
{
"en" "Your name is reserved by SourceMod; set your password to use it."
}
/* This is a special "pass-thru" translation */ /* This is a special "pass-thru" translation */
"_s" "_s"
{ {