Skip to content

Commit b8ad3b7

Browse files
committed
remove error logging to #zkerror as this can nuke database in feedback loop
1 parent d038d39 commit b8ad3b7

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

Shared/PlasmaShared/GlobalConst.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ static void SetMode(ModeType newMode)
153153

154154
public const string ModeratorChannel = "zkadmin";
155155
public const string Top20Channel = "zktop20";
156-
public const string ErrorChannel = "zkerror";
157156
public const string UserLogChannel = "zklog";
158157
public const string CoreChannel = "zkcore";
159158

ZkLobbyServer/ChannelManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public bool CanJoin(Account acc, string channel)
9595
{
9696
if (channel.StartsWith(PartyManager.PartyChannelPrefix)) return server.PartyManager.CanJoinChannel(acc.Name, channel);
9797
else if (channel == GlobalConst.ModeratorChannel) return acc.AdminLevel >= AdminLevel.Moderator;
98-
else if (channel == GlobalConst.ErrorChannel) return acc.AdminLevel >= AdminLevel.SuperAdmin;
9998
else if (channel == GlobalConst.UserLogChannel) return acc.AdminLevel >= AdminLevel.SuperAdmin;
10099
else if (channel == GlobalConst.Top20Channel) return IsTop20(acc.AccountID);
101100
else if (channel == GlobalConst.CoreChannel) return acc.DevLevel >= DevLevel.RetiredCoreDeveloper;

ZkLobbyServer/ZkServerTraceListener.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public class ZkServerTraceListener: TraceListener
1414
{
1515
public ZkLobbyServer ZkLobbyServer { get; set; }
1616

17-
ConcurrentQueue<Say> queue = new ConcurrentQueue<Say>();
18-
1917
public ZkServerTraceListener(ZkLobbyServer zkLobbyServer = null)
2018
{
2119
using (var db = new ZkDataContext())
@@ -53,18 +51,6 @@ async Task ProcessEvent(TraceEventType type, string text)
5351
db.LogEntries.Add(new LogEntry() { Time = DateTime.UtcNow, Message = text, TraceEventType = type });
5452
await db.SaveChangesAsync();
5553
}
56-
57-
// write error and critical logs to server
58-
if (type == TraceEventType.Error || type == TraceEventType.Critical) {
59-
var say = new Say() { Place = SayPlace.Channel, Target = GlobalConst.ErrorChannel, Text = text, User = GlobalConst.NightwatchName, Time=DateTime.UtcNow};
60-
61-
if (ZkLobbyServer != null) {
62-
// server runnin, flush queue and add new say
63-
Say history;
64-
while (queue.TryDequeue(out history)) await ZkLobbyServer.GhostSay(history);
65-
await ZkLobbyServer.GhostSay(say);
66-
} else queue.Enqueue(say); // server not running (stuff intiializing) store in queueu
67-
}
6854
}
6955
}
7056
}

0 commit comments

Comments
 (0)