Don't show + for MCGalaxy staff, don't log 'SAVED: XYZ' to main gui window.

This commit is contained in:
UnknownShadow200 2016-06-11 22:36:34 +10:00
parent 9879878fcf
commit 68ebcbb109
6 changed files with 9 additions and 8 deletions

View File

@ -69,9 +69,9 @@ namespace MCGalaxy.Commands {
Player.Message(p, " is banned");
}
if (Server.Devs.CaselessContains(who.Name))
if (Server.Devs.CaselessContains(who.Name.TrimEnd('+')))
Player.Message(p, " Player is an &9MCGalaxy Developer");
if (Server.Mods.CaselessContains(who.Name))
if (Server.Mods.CaselessContains(who.Name.TrimEnd('+')))
Player.Message(p, " Player is an &9MCGalaxy Moderator");
if (canSeeIP) {

View File

@ -83,7 +83,7 @@ namespace MCGalaxy.Commands
if (p.adminchat) adminchat.Use(p, message);
Server.hidden.Remove(p.name);
}
Server.hidden.Save();
Server.hidden.Save(false);
}
public override void Help(Player p) {

View File

@ -321,8 +321,8 @@ namespace MCGalaxy {
name += "+";
byte type = message[129];
isDev = Server.Devs.CaselessContains(name);
isMod = Server.Mods.CaselessContains(name);
isDev = Server.Devs.CaselessContains(truename);
isMod = Server.Mods.CaselessContains(truename);
try {
Server.TempBan tBan = Server.tempBans.Find(tB => tB.name.ToLower() == name.ToLower());

View File

@ -66,7 +66,7 @@ namespace MCGalaxy {
w.WriteLine(line);
}
}
if (console) Server.s.Log("SAVED: " + path);
if (console) Server.s.Log("SAVED: " + path, true);
}
public static PlayerExtList Load(string path) {

View File

@ -53,6 +53,7 @@ namespace MCGalaxy {
} }
public void Save() { Save(file, true); }
public void Save(bool console) { Save(file, console); }
public void Save(string file, bool console) {
using (StreamWriter w = File.CreateText("ranks/" + file)) {
@ -62,7 +63,7 @@ namespace MCGalaxy {
}
}
if (console)
Server.s.Log("SAVED: " + file);
Server.s.Log("SAVED: " + file, true);
}
public static PlayerList Load(string path) {

View File

@ -231,7 +231,7 @@ namespace MCGalaxy {
string type = line.Split(':')[0].ToLower();
List<string> staffList = type.Equals("devs") ? Devs : type.Equals("mods") ? Mods : null;
foreach (string name in line.Split(':')[1].Split())
staffList.Add(name);
staffList.Add(name.TrimEnd('+'));
}
}
} catch (Exception e) {