Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Shared/PlasmaShared/GlobalConst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
1 change: 0 additions & 1 deletion ZkLobbyServer/ChannelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 0 additions & 14 deletions ZkLobbyServer/ZkServerTraceListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public class ZkServerTraceListener: TraceListener
{
public ZkLobbyServer ZkLobbyServer { get; set; }

ConcurrentQueue<Say> queue = new ConcurrentQueue<Say>();

public ZkServerTraceListener(ZkLobbyServer zkLobbyServer = null)
{
using (var db = new ZkDataContext())
Expand Down Expand Up @@ -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
}
}
}
}
Loading