From ba510dac44fc1bdad81bc8bde4a2eea30d0cb27f Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 8 Sep 2017 10:07:07 -0400 Subject: [PATCH] Runs a chat connectivity check when the world reboots --- TGServerService/Chat.cs | 10 ++++++++++ TGServerService/Interop.cs | 1 + 2 files changed, 11 insertions(+) diff --git a/TGServerService/Chat.cs b/TGServerService/Chat.cs index cafc390697..d10633a943 100644 --- a/TGServerService/Chat.cs +++ b/TGServerService/Chat.cs @@ -239,6 +239,16 @@ namespace TGServerService return false; } + /// + /// Reconnect servers that are enabled and disconnected + /// + void ChatConnectivityCheck() + { + foreach (TGChatProvider I in Enum.GetValues(typeof(TGChatProvider))) + if(!Connected(I)) + Reconnect(I); + } + //public api public string Reconnect(TGChatProvider providerType) { diff --git a/TGServerService/Interop.cs b/TGServerService/Interop.cs index e30144b16b..47f168a324 100644 --- a/TGServerService/Interop.cs +++ b/TGServerService/Interop.cs @@ -75,6 +75,7 @@ namespace TGServerService case SRWorldReboot: TGServerService.WriteInfo("World Rebooted", TGServerService.EventID.WorldReboot); ServerChatCommands = null; + ChatConnectivityCheck(); lock (CompilerLock) { if (UpdateStaged)