1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

Various fixes and renamed 'libary' to 'library'

This commit is contained in:
RaidMax
2015-08-27 23:39:36 -05:00
parent c23e578319
commit 995334796e
31 changed files with 146 additions and 129 deletions

View File

@ -125,27 +125,24 @@ namespace IW4MAdmin
if (pID == 0)
continue;
bool newProcess = true;
foreach (int I in activePIDs)
if (activePIDs.IndexOf(pID) == -1 && !ThreadList.ContainsKey(pID))
{
if (I == pID)
newProcess = false;
}
if (newProcess)
{
if (!ThreadList.ContainsKey(pID))
Server S = loadIndividualServer(pID);
if (S == null)
{
Server S = loadIndividualServer(pID);
Servers.Add(S);
Thread IW4MServerThread = new Thread(S.Monitor);
ThreadList.Add(pID, IW4MServerThread);
mainLog.Write("New server detected on port " + S.getPort(), Log.Level.Production);
IW4MServerThread.Start();
mainLog.Write("Unable to load new detected server!", Log.Level.Debug);
continue;
}
Servers.Add(S);
Thread IW4MServerThread = new Thread(S.Monitor);
ThreadList.Add(pID, IW4MServerThread);
mainLog.Write("New server detected on port " + S.getPort(), Log.Level.Production);
IW4MServerThread.Start();
}
}
}
private bool isIW4MStillRunning(int pID)