diff --git a/MCGalaxy/Chat/LineWrapper.cs b/MCGalaxy/Chat/LineWrapper.cs index d34bc9058..2b68c3008 100644 --- a/MCGalaxy/Chat/LineWrapper.cs +++ b/MCGalaxy/Chat/LineWrapper.cs @@ -31,7 +31,7 @@ namespace MCGalaxy { //if (Regex.IsMatch(message, "&a")) break; if ( lines.Count > 0 ) { - if ( message[0].ToString() == "&" ) + if ( message[0] == '&' ) message = "> " + message.Trim(); else message = "> " + color + message.Trim(); diff --git a/MCGalaxy/Commands/Bots/CmdBotSet.cs b/MCGalaxy/Commands/Bots/CmdBotSet.cs index 538910d1f..d1b0b35f4 100644 --- a/MCGalaxy/Commands/Bots/CmdBotSet.cs +++ b/MCGalaxy/Commands/Bots/CmdBotSet.cs @@ -53,13 +53,13 @@ namespace MCGalaxy.Commands.Bots { } string ai = args[1].ToLower(); - if (ai == "hunt") { + if (ai.CaselessEq("hunt")) { bot.hunt = !bot.hunt; bot.Instructions.Clear(); bot.AIName = ""; UpdateBot(p, bot, "'s hunt instinct: " + bot.hunt); return; - } else if (ai == "kill") { + } else if (ai.CaselessEq("kill")) { if (!CheckExtraPerm(p)) { MessageNeedExtra(p, 1); return; } bot.kill = !bot.kill; UpdateBot(p, bot, "'s kill instinct: " + bot.kill); diff --git a/MCGalaxy/Server/Server.Init.cs b/MCGalaxy/Server/Server.Init.cs index 9cf9ec78f..7752b8e1d 100644 --- a/MCGalaxy/Server/Server.Init.cs +++ b/MCGalaxy/Server/Server.Init.cs @@ -85,8 +85,8 @@ namespace MCGalaxy { List maps = AutoloadMaps.AllNames(); foreach (string map in maps) { - string name = map.ToLower(); - if (name != mainLevel.name) CmdLoad.LoadLevel(null, name); + if (map.CaselessEq(mainLevel.name)) continue; + CmdLoad.LoadLevel(null, map); } }