mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 03:55:18 -04:00
Don't count colors in nickname for <30 char limit
This commit is contained in:
parent
18938e9ee9
commit
800fe69e5f
@ -102,7 +102,7 @@ namespace MCGalaxy {
|
||||
};
|
||||
|
||||
static string TokenDate(Player p) { return DateTime.Now.ToString("yyyy-MM-dd"); }
|
||||
static string TokenTime(Player p) { return DateTime.Now.ToString("HH:mm:ss"); }
|
||||
static string TokenTime(Player p) { return DateTime.Now.ToString("hh:mm tt"); }
|
||||
static string TokenIRC(Player p) { return Server.Config.IRCServer + " > " + Server.Config.IRCChannels; }
|
||||
static string TokenBanned(Player p) { return Group.BannedRank.Players.Count.ToString(); }
|
||||
static string TokenServerName(Player p) { return Server.Config.Name; }
|
||||
|
@ -52,7 +52,7 @@ namespace MCGalaxy {
|
||||
|
||||
// If a bad word is found anywhere in the word, replace the word
|
||||
int length = words[i].Length;
|
||||
words[i] = new String('*', length);
|
||||
words[i] = "&c[&fBlocked&c]&f";
|
||||
}
|
||||
return String.Join(" ", words);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ namespace MCGalaxy.Commands.Chatting {
|
||||
Chat.MessageFrom(who, "λNICK %Shad their custom nick reset");
|
||||
who.DisplayName = who.truename;
|
||||
} else {
|
||||
if (nick.Length >= 30) { p.Message("Nick must be under 30 letters."); return; }
|
||||
if (Colors.Strip(nick).Length >= 30) { p.Message("Nick must be under 30 letters."); return; }
|
||||
|
||||
Chat.MessageFrom(who, "λNICK %Shad their nick set to " + who.color + nick);
|
||||
who.DisplayName = nick;
|
||||
|
Loading…
x
Reference in New Issue
Block a user