X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_mssql.cpp;h=eca646fcfb8d2e1620fadf8198a7576cf51868d8;hb=44f42a13de52c8025942ddab42f51feb36821782;hp=2e5dc8b7bb8e3fc8afd9f472dc5023d3b436b373;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp index 2e5dc8b7b..eca646fcf 100644 --- a/src/modules/extra/m_mssql.cpp +++ b/src/modules/extra/m_mssql.cpp @@ -1,16 +1,26 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2008-2009 Dennis Friis + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008-2009 Craig Edwards + * Copyright (C) 2008 Robin Burchell + * Copyright (C) 2008 Pippijn van Steenhoven * - * This program is free but copyrighted software; see - * the file COPYING for details. + * 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 #include @@ -644,10 +654,13 @@ class ModuleMsSQL : public Module { LoggingMutex = new Mutex(); ResultsMutex = new Mutex(); + queryDispatcher = new QueryThread(this); + } + void init() + { ReadConf(); - queryDispatcher = new QueryThread(this); ServerInstance->Threads->Start(queryDispatcher); Implementation eventlist[] = { I_OnRehash }; @@ -767,12 +780,9 @@ class ModuleMsSQL : public Module void ClearAllConnections() { - ConnMap::iterator i; - while ((i = connections.begin()) != connections.end()) - { - connections.erase(i); + for(ConnMap::iterator i = connections.begin(); i != connections.end(); ++i) delete i->second; - } + connections.clear(); } virtual void OnRehash(User* user)