Modified Command_Kick to display the reason (if given) on the kick message.

Modified the translation file to use the new reason style.
This commit is contained in:
Liam 2008-12-28 16:48:59 -05:00
parent a7a08a7d4e
commit ddc42bedf5
2 changed files with 165 additions and 142 deletions

View File

@ -155,13 +155,30 @@ public Action:Command_Kick(client, args)
sizeof(target_name),
tn_is_ml)) > 0)
{
decl String:reason[64];
Format(reason, sizeof(reason), Arguments[len]);
if (tn_is_ml)
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target", target_name);
if (reason[0] == '\0')
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target", target_name);
}
else
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target reason", target_name, reason);
}
}
else
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target", "_s", target_name);
if (reason[0] == '\0')
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target", "_s", target_name);
}
else
{
ShowActivity2(client, "[SM] ", "%t", "Kicked target reason", "_s", target_name, reason);
}
}
new kick_self = 0;
@ -175,13 +192,13 @@ public Action:Command_Kick(client, args)
}
else
{
PerformKick(client, target_list[i], Arguments[len]);
PerformKick(client, target_list[i], reason);
}
}
if (kick_self)
{
PerformKick(client, client, Arguments[len]);
PerformKick(client, client, reason);
}
}
else

View File

@ -1,138 +1,144 @@
"Phrases"
{
"Unable to find cvar"
{
"#format" "{1:s}"
"en" "Unable to find cvar: {1}"
}
"No access to cvar"
{
"en" "You do not have access to this cvar."
}
"Value of cvar"
{
"#format" "{1:s},{2:s}"
"en" "Value of cvar \"{1}\": \"{2}\""
}
"Cvar changed"
{
"#format" "{1:s},{2:s}"
"en" "Changed cvar \"{1}\" to \"{2}\"."
}
"Config not found"
{
"#format" "{1:s}"
"en" "Config file \"{1}\" not found."
}
"Executed config"
{
"#format" "{1:s}"
"en" "Executed config \"{1}\"."
}
"Permabanned player"
{
"#format" "{1:s}"
"en" "Permanently banned player \"{1}\"."
}
"Permabanned player reason"
{
"#format" "{1:s},{2:s}"
"en" "Permanently banned player \"{1}\" (reason: {2})."
}
"Banned player"
{
"#format" "{1:s},{2:d}"
"en" "Banned player \"{1}\" for {2} minutes."
}
"Banned player reason"
{
"#format" "{1:s},{2:d},{3:s}"
"en" "Banned player \"{1}\" for {2} minutes (reason: {3})."
}
"Removed bans matching"
{
"#format" "{1:s}"
"en" "Removed bans matching filter: {1}"
}
"Ban added"
{
"en" "Ban has been added."
}
"Admin cache refreshed"
{
"en" "Admin cache has been refreshed."
}
"Identify player"
{
"en" "Identify player"
}
"Choose Map"
{
"en" "Choose Map"
}
"Exec CFG"
{
"en" "Exec CFG"
}
"Admin logged in as"
{
"#format" "{1:s},{2:s},{3:s}"
"en" "\"{1}\" is logged in as \"{2}\" with access: {3}"
}
"Admin logged in anon"
{
"#format" "{1:s},{2:s}"
"en" "\"{1}\" has access: {2}"
}
"Player is not an admin"
{
"#format" "{1:s}"
"en" "\"{1}\" is not an admin."
}
"Player is an admin"
{
"#format" "{1:s}"
"en" "\"{1}\" is an admin."
}
"Username"
{
"en" "Username"
}
"Kicked target"
{
"#format" "{1:t}"
"en" "Kicked {1}."
}
"Admin access"
{
"en" "Admin access"
}
"Cvar is now protected"
{
"#format" "{1:s}"
"en" "Cvar {1} is now protected."
}
}
"Phrases"
{
"Unable to find cvar"
{
"#format" "{1:s}"
"en" "Unable to find cvar: {1}"
}
"No access to cvar"
{
"en" "You do not have access to this cvar."
}
"Value of cvar"
{
"#format" "{1:s},{2:s}"
"en" "Value of cvar \"{1}\": \"{2}\""
}
"Cvar changed"
{
"#format" "{1:s},{2:s}"
"en" "Changed cvar \"{1}\" to \"{2}\"."
}
"Config not found"
{
"#format" "{1:s}"
"en" "Config file \"{1}\" not found."
}
"Executed config"
{
"#format" "{1:s}"
"en" "Executed config \"{1}\"."
}
"Permabanned player"
{
"#format" "{1:s}"
"en" "Permanently banned player \"{1}\"."
}
"Permabanned player reason"
{
"#format" "{1:s},{2:s}"
"en" "Permanently banned player \"{1}\" (reason: {2})."
}
"Banned player"
{
"#format" "{1:s},{2:d}"
"en" "Banned player \"{1}\" for {2} minutes."
}
"Banned player reason"
{
"#format" "{1:s},{2:d},{3:s}"
"en" "Banned player \"{1}\" for {2} minutes (reason: {3})."
}
"Removed bans matching"
{
"#format" "{1:s}"
"en" "Removed bans matching filter: {1}"
}
"Ban added"
{
"en" "Ban has been added."
}
"Admin cache refreshed"
{
"en" "Admin cache has been refreshed."
}
"Identify player"
{
"en" "Identify player"
}
"Choose Map"
{
"en" "Choose Map"
}
"Exec CFG"
{
"en" "Exec CFG"
}
"Admin logged in as"
{
"#format" "{1:s},{2:s},{3:s}"
"en" "\"{1}\" is logged in as \"{2}\" with access: {3}"
}
"Admin logged in anon"
{
"#format" "{1:s},{2:s}"
"en" "\"{1}\" has access: {2}"
}
"Player is not an admin"
{
"#format" "{1:s}"
"en" "\"{1}\" is not an admin."
}
"Player is an admin"
{
"#format" "{1:s}"
"en" "\"{1}\" is an admin."
}
"Username"
{
"en" "Username"
}
"Kicked target"
{
"#format" "{1:t}"
"en" "Kicked {1}"
}
"Kicked target reason"
{
"#format" "{1:t},{2:s}"
"en" "Kicked {1} (Reason: {2})"
}
"Admin access"
{
"en" "Admin access"
}
"Cvar is now protected"
{
"#format" "{1:s}"
"en" "Cvar {1} is now protected."
}
}