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:
parent
a7a08a7d4e
commit
ddc42bedf5
@ -155,14 +155,31 @@ 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)
|
||||
{
|
||||
if (reason[0] == '\0')
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Kicked target", target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Kicked target reason", target_name, reason);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
|
@ -122,7 +122,13 @@
|
||||
"Kicked target"
|
||||
{
|
||||
"#format" "{1:t}"
|
||||
"en" "Kicked {1}."
|
||||
"en" "Kicked {1}"
|
||||
}
|
||||
|
||||
"Kicked target reason"
|
||||
{
|
||||
"#format" "{1:t},{2:s}"
|
||||
"en" "Kicked {1} (Reason: {2})"
|
||||
}
|
||||
|
||||
"Admin access"
|
||||
|
Loading…
Reference in New Issue
Block a user