X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_namedpipe.cpp;h=632c2cca0084ee836f79e7ea2ae62bd3d2a65cfe;hb=46a39046196f55b52336e19662bb7bac85b731ac;hp=36724366010575c741a3cc7e2702c8562e735f26;hpb=1fd22793d17a5e8e385d86d2dbd2276b1876680a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp index 367243660..632c2cca0 100644 --- a/win/inspircd_namedpipe.cpp +++ b/win/inspircd_namedpipe.cpp @@ -1,3 +1,22 @@ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * Copyright (C) 2008 Craig Edwards + * + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #include "inspircd.h" #include "threadengine.h" #include "inspircd_namedpipe.h" @@ -6,7 +25,7 @@ #include -IPCThread::IPCThread(InspIRCd* Instance) : Thread(), ServerInstance(Instance) +IPCThread::IPCThread() { if (!initwmi()) ServerInstance->Logs->Log("IPC", DEBUG, "Could not initialise WMI. CPU percantage reports will not be available."); @@ -127,11 +146,11 @@ void IPCThread::SetResult(int newresult) } -IPC::IPC(InspIRCd* Srv) : ServerInstance(Srv) +IPC::IPC() { /* The IPC pipe is threaded */ - thread = new IPCThread(Srv); - Srv->Threads->Create(thread); + thread = new IPCThread(); + ServerInstance->Threads->Start(thread); } void IPC::Check() @@ -165,7 +184,7 @@ void IPC::Check() /* Toggle debug */ thread->SetResult(0); thread->ClearStatus(); - ServerInstance->Config->forcedebug = !ServerInstance->Config->forcedebug; + ServerInstance->Config->cmdline.forcedebug = !ServerInstance->Config->cmdline.forcedebug; break; } }