diff --git a/Shared/PlasmaShared/GlobalConst.cs b/Shared/PlasmaShared/GlobalConst.cs index ec5429859..ae1e4dbf5 100644 --- a/Shared/PlasmaShared/GlobalConst.cs +++ b/Shared/PlasmaShared/GlobalConst.cs @@ -153,7 +153,6 @@ static void SetMode(ModeType newMode) public const string ModeratorChannel = "zkadmin"; public const string Top20Channel = "zktop20"; - public const string ErrorChannel = "zkerror"; public const string UserLogChannel = "zklog"; public const string CoreChannel = "zkcore"; diff --git a/ZkLobbyServer/ChannelManager.cs b/ZkLobbyServer/ChannelManager.cs index 03e6fd1f3..0ab29103a 100644 --- a/ZkLobbyServer/ChannelManager.cs +++ b/ZkLobbyServer/ChannelManager.cs @@ -95,7 +95,6 @@ public bool CanJoin(Account acc, string channel) { if (channel.StartsWith(PartyManager.PartyChannelPrefix)) return server.PartyManager.CanJoinChannel(acc.Name, channel); else if (channel == GlobalConst.ModeratorChannel) return acc.AdminLevel >= AdminLevel.Moderator; - else if (channel == GlobalConst.ErrorChannel) return acc.AdminLevel >= AdminLevel.SuperAdmin; else if (channel == GlobalConst.UserLogChannel) return acc.AdminLevel >= AdminLevel.SuperAdmin; else if (channel == GlobalConst.Top20Channel) return IsTop20(acc.AccountID); else if (channel == GlobalConst.CoreChannel) return acc.DevLevel >= DevLevel.RetiredCoreDeveloper; diff --git a/ZkLobbyServer/ZkServerTraceListener.cs b/ZkLobbyServer/ZkServerTraceListener.cs index a32ae50a2..8432a942e 100644 --- a/ZkLobbyServer/ZkServerTraceListener.cs +++ b/ZkLobbyServer/ZkServerTraceListener.cs @@ -14,8 +14,6 @@ public class ZkServerTraceListener: TraceListener { public ZkLobbyServer ZkLobbyServer { get; set; } - ConcurrentQueue queue = new ConcurrentQueue(); - public ZkServerTraceListener(ZkLobbyServer zkLobbyServer = null) { using (var db = new ZkDataContext()) @@ -53,18 +51,6 @@ async Task ProcessEvent(TraceEventType type, string text) db.LogEntries.Add(new LogEntry() { Time = DateTime.UtcNow, Message = text, TraceEventType = type }); await db.SaveChangesAsync(); } - - // write error and critical logs to server - if (type == TraceEventType.Error || type == TraceEventType.Critical) { - var say = new Say() { Place = SayPlace.Channel, Target = GlobalConst.ErrorChannel, Text = text, User = GlobalConst.NightwatchName, Time=DateTime.UtcNow}; - - if (ZkLobbyServer != null) { - // server runnin, flush queue and add new say - Say history; - while (queue.TryDequeue(out history)) await ZkLobbyServer.GhostSay(history); - await ZkLobbyServer.GhostSay(say); - } else queue.Enqueue(say); // server not running (stuff intiializing) store in queueu - } } } } \ No newline at end of file