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), sizeof(target_name),
tn_is_ml)) > 0) tn_is_ml)) > 0)
{ {
decl String:reason[64];
Format(reason, sizeof(reason), Arguments[len]);
if (tn_is_ml) 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 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; new kick_self = 0;
@ -175,13 +192,13 @@ public Action:Command_Kick(client, args)
} }
else else
{ {
PerformKick(client, target_list[i], Arguments[len]); PerformKick(client, target_list[i], reason);
} }
} }
if (kick_self) if (kick_self)
{ {
PerformKick(client, client, Arguments[len]); PerformKick(client, client, reason);
} }
} }
else else

View File

@ -122,7 +122,13 @@
"Kicked target" "Kicked target"
{ {
"#format" "{1:t}" "#format" "{1:t}"
"en" "Kicked {1}." "en" "Kicked {1}"
}
"Kicked target reason"
{
"#format" "{1:t},{2:s}"
"en" "Kicked {1} (Reason: {2})"
} }
"Admin access" "Admin access"