Allow localization of name-reserved kick message (bug 5146, r=asherkin).
Allow localization of name-reserved kick message (
bug 5146, r=asherkin).
1.1 --- a/core/PlayerManager.cpp Wed Apr 03 12:26:08 2013 -0400
1.2 +++ b/core/PlayerManager.cpp Mon Apr 08 08:00:13 2013 -0400
1.3 @@ -1097,7 +1097,9 @@
1.4 {
1.5 if (!CheckSetAdminName(client, pPlayer, id))
1.6 {
1.7 - pPlayer->Kick("Your name is reserved by SourceMod; set your password to use it.");
1.8 + char kickMsg[128];
1.9 + logicore.CoreTranslate(kickMsg, sizeof(kickMsg), "%T", 2, NULL, "Name Reserved", &client);
1.10 + pPlayer->Kick(kickMsg);
1.11 RETURN_META(MRES_IGNORED);
1.12 }
1.13 } else if ((id = g_Admins.FindAdminByIdentity("name", old_name)) != INVALID_ADMIN_ID) {
2.1 --- a/translations/core.phrases.txt Wed Apr 03 12:26:08 2013 -0400
2.2 +++ b/translations/core.phrases.txt Mon Apr 08 08:00:13 2013 -0400
2.3 @@ -78,6 +78,11 @@
2.4 "en" "No Vote"
2.5 }
2.6
2.7 + "Name Reserved"
2.8 + {
2.9 + "en" "Your name is reserved by SourceMod; set your password to use it."
2.10 + }
2.11 +
2.12 /* This is a special "pass-thru" translation */
2.13 "_s"
2.14 {