public void cmdNameUnBan(string message) { if (message == "") { sendToUser("Syntax: nunban <name to unban>", true, false, false); } else if (!NameIsBanned(message)) { sendToUser("Name \"" + message + "\" is not in the ban list", true, false, false); } else { NameBanList = loadNameBans(); for (int i = NameBanList.Count - 1; i >= 0; i--) { if (NameBanList[i].ToLower() == message.ToLower()) { NameBanList.RemoveAt(i); saveNameBans(); sendToUser("Name \"" + message + "\" removed from the ban list", true, false, false); return; } } sendToUser("Strange .. you shouldn't be here ...", true, false, false); } }
public void cmdNameBan(string message) { if (message == "") { sendToUser("Syntax: nban <name to ban>", true, false, false); } else if (NameIsBanned(message)) { sendToUser("\"" + message + "\" is already in the ban list", true, false, false); } else { NameBanList.Add(message); saveNameBans(); sendToUser("Name \"" + message + "\" added to the ban list", true, false, false); } }