ChatSetupInfo lists are sanity checked

This commit is contained in:
Cyberboss
2017-11-11 19:21:49 -05:00
parent 8a4ed56d8f
commit 0fb55df7ea
3 changed files with 19 additions and 13 deletions
+6
View File
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using TGServerService.ChatCommands;
@@ -174,6 +175,11 @@ namespace TGServerService
/// <inheritdoc />
public string SetProviderInfo(ChatSetupInfo info)
{
info.AdminList.RemoveAll(x => String.IsNullOrWhiteSpace(x));
info.AdminChannels.RemoveAll(x => String.IsNullOrWhiteSpace(x));
info.GameChannels.RemoveAll(x => String.IsNullOrWhiteSpace(x));
info.DevChannels.RemoveAll(x => String.IsNullOrWhiteSpace(x));
info.WatchdogChannels.RemoveAll(x => String.IsNullOrWhiteSpace(x));
try
{
lock (ChatLock)