diff --git a/MCGalaxy/Server/ServerConfig.cs b/MCGalaxy/Server/ServerConfig.cs index df5c6d718..edc852c43 100644 --- a/MCGalaxy/Server/ServerConfig.cs +++ b/MCGalaxy/Server/ServerConfig.cs @@ -25,7 +25,7 @@ namespace MCGalaxy { public sealed class ServerConfig : EnvConfig { - [ConfigString("server-name", "Server", "[MCGalaxy] Default", false, " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")] + [ConfigString("server-name", "Server", "[MCGalaxy] Default", false, BASE_NAME_CHARS + CP437_NAME_CHARS)] public string Name = "[MCGalaxy] Default"; [ConfigString("motd", "Server", "Welcome", false)] public string MOTD = "Welcome!"; @@ -316,5 +316,17 @@ namespace MCGalaxy public TimeSpan IPSpamBlockTime = TimeSpan.FromSeconds(180); [ConfigTimespan("ip-spam-interval", "Spam control", 60, false)] public TimeSpan IPSpamInterval = TimeSpan.FromSeconds(60); + + + // List of characters that are both + // - unicode codepoints <= 255 (so accepted by classicube.net DB) + // - code page 437 characters (so accepted by ClassiCube client) + const string BASE_NAME_CHARS = " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; + const string CP437_0x80 = "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5"; // ÇüéâäàåçêëèïîìÄÅ + const string CP437_0x90 = "\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5"; // ÉæÆôöòûùÿÖÜ¢£¥ + const string CP437_0xA0 = "\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAC\xBD\xBC\xA1\xAB\xBB"; // áíóúñѪº¿¬½¼¡«» + const string CP437_0xE0 = "\xDF\xB5"; // ßµ + const string CP437_0xF0 = "\xB1\xF7\xB0\xB7\xB2\xA0"; // ±÷°·² + const string CP437_NAME_CHARS = CP437_0x80 + CP437_0x90 + CP437_0xA0 + CP437_0xE0 + CP437_0xF0; } -} \ No newline at end of file +}