Fixed a potential issue surrounding silent kicks
This should resolve any issues where a player being kicked prior to join has a mesasge sent to chat. If not, then the method calling the ForceKick function isn't specifying that it should be silent.
This commit is contained in:
parent
08d06c023e
commit
2169d455af
1 changed files with 7 additions and 4 deletions
|
|
@ -588,10 +588,13 @@ namespace TShockAPI
|
||||||
player.Disconnect(string.Format("Kicked: {0}", reason));
|
player.Disconnect(string.Format("Kicked: {0}", reason));
|
||||||
Log.ConsoleInfo(string.Format("Kicked {0} for : {1}", playerName, reason));
|
Log.ConsoleInfo(string.Format("Kicked {0} for : {1}", playerName, reason));
|
||||||
string verb = force ? "force " : "";
|
string verb = force ? "force " : "";
|
||||||
if (string.IsNullOrWhiteSpace(adminUserName))
|
if (!silent)
|
||||||
Broadcast(string.Format("{0} was {1}kicked for {2}", playerName, verb, reason.ToLower()));
|
{
|
||||||
else
|
if (string.IsNullOrWhiteSpace(adminUserName))
|
||||||
Broadcast(string.Format("{0} {1}kicked {2} for {3}", adminUserName, verb, playerName, reason.ToLower()));
|
Broadcast(string.Format("{0} was {1}kicked for {2}", playerName, verb, reason.ToLower()));
|
||||||
|
else
|
||||||
|
Broadcast(string.Format("{0} {1}kicked {2} for {3}", adminUserName, verb, playerName, reason.ToLower()));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue