Don't show + in names in connect/disconnect logs

This commit is contained in:
UnknownShadow200 2020-12-18 21:10:03 +11:00
parent ee0e3ed542
commit 1e09de0425
4 changed files with 8 additions and 7 deletions

View File

@ -38,7 +38,7 @@ namespace MCGalaxy.Commands.Moderation {
if (Server.frozen.Contains(target)) {
DoUnfreeze(p, target, args);
} else {
// unmute has second argument as reason, mute has third argument instead
// unfreeze has second argument as reason, freeze has third argument instead
DoFreeze(p, target, message.SplitSpaces(3));
}
}

View File

@ -228,6 +228,7 @@ namespace MCGalaxy.Network {
protected abstract void HandleData(byte[] data, int len);
/// <summary> Sends data to the underlying socket without wrapping the data in a websocket frame </summary>
protected abstract void SendRaw(byte[] data, bool sync);
public void Disconnect() { Disconnect(1000); }

View File

@ -145,9 +145,9 @@ namespace MCGalaxy {
Message("Lowlag mode is currently &aON.");
if (String.IsNullOrEmpty(appName)) {
Logger.Log(LogType.UserActivity, "{0} [{1}] connected.", name, ip);
Logger.Log(LogType.UserActivity, "{0} [{1}] connected.", truename, ip);
} else {
Logger.Log(LogType.UserActivity, "{0} [{1}] connected using {2}.", name, ip, appName);
Logger.Log(LogType.UserActivity, "{0} [{1}] connected using {2}.", truename, ip, appName);
}
PlayerActions.PostSentMap(this, null, level, false);

View File

@ -263,7 +263,7 @@ namespace MCGalaxy {
if (!loggedIn) {
PlayerInfo.Online.Remove(this);
string user = name + " (" + ip + ")";
string user = truename + " (" + ip + ")";
Logger.Log(LogType.UserActivity, "{0} disconnected. ({1})", user, discMsg);
return;
}
@ -292,11 +292,11 @@ namespace MCGalaxy {
if (Server.Config.GuestLeavesNotify || Rank > LevelPermission.Guest) {
Chat.MessageFrom(ChatScope.All, this, leaveMsg, null, Chat.FilterVisible(this), !hidden);
}
Logger.Log(LogType.UserActivity, "{0} disconnected ({1}%S).", name, chatMsg);
Logger.Log(LogType.UserActivity, "{0} disconnected ({1}%S).", truename, chatMsg);
} else {
string leaveMsg = "&c- λFULL %Skicked %S" + chatMsg;
Chat.MessageFrom(ChatScope.All, this, leaveMsg, null, null, true);
Logger.Log(LogType.UserActivity, "{0} kicked ({1}%S).", name, chatMsg);
Logger.Log(LogType.UserActivity, "{0} kicked ({1}%S).", truename, chatMsg);
}
}