Fix a infinite loop

This commit is contained in:
Zontreck 2020-06-21 01:07:41 -07:00
parent 9e3d08ddcc
commit 4920ed431e
2 changed files with 5 additions and 12 deletions

View file

@ -352,12 +352,8 @@ namespace Bot
client.Self.RetrieveInstantMessages();
if (client.Network.Connected == false) g_iIsRunning = false; // Quit the program and restart immediately!
Thread.Sleep(2000);
DirectoryInfo lp = new DirectoryInfo("update");
if (lp.Exists) g_iIsRunning = false;
if (conf.ConfigFor == "Main")
{
msg(MessageHandler.Destinations.DEST_LOCAL, UUID.Zero, "Alert: Main.json is not fully initialized. Setting default values");
@ -384,18 +380,15 @@ namespace Bot
Flavor = conf.ConfigFor;
}
registry = CommandRegistry.Instance;
registry.LocateCommands();
//msg(MessageHandler.Destinations.DEST_LOCAL, UUID.Zero, "Commands found: " + registry.Cmds.Count.ToString());
GroupsCache = new Dictionary<UUID, Group>();
ReloadGroupsCache();
if (startupSeq)
{
registry = CommandRegistry.Instance;
registry.LocateCommands();
GroupsCache = new Dictionary<UUID, Group>();
ReloadGroupsCache();
//ReloadGroupsCache();
try
{