#include <psapi.h>\r
\r
\r
-IPCThread::IPCThread(InspIRCd* Instance) : Thread(), ServerInstance(Instance)\r
+IPCThread::IPCThread()\r
{\r
if (!initwmi())\r
ServerInstance->Logs->Log("IPC", DEBUG, "Could not initialise WMI. CPU percantage reports will not be available.");\r
}\r
\r
\r
-IPC::IPC(InspIRCd* Srv) : ServerInstance(Srv)\r
+IPC::IPC()\r
{\r
/* The IPC pipe is threaded */\r
- thread = new IPCThread(Srv);\r
- Srv->Threads->Create(thread);\r
+ thread = new IPCThread();\r
+ ServerInstance->Threads->Start(thread);\r
}\r
\r
void IPC::Check()\r
/* Toggle debug */\r
thread->SetResult(0);\r
thread->ClearStatus();\r
- Config->forcedebug = !Config->forcedebug;\r
+ ServerInstance->Config->forcedebug = !ServerInstance->Config->forcedebug;\r
break;\r
}\r
}\r