]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_mssql.cpp
Merge pull request #109 from Justasic/insp20
[user/henk/code/inspircd.git] / src / modules / extra / m_mssql.cpp
index 7561fb2d80c7637fcd2cc74a06d31cf03f6c3a0a..eca646fcfb8d2e1620fadf8198a7576cf51868d8 100644 (file)
@@ -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 <peavey@inspircd.org>
+ *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2008-2009 Craig Edwards <craigedwards@brainbox.cc>
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
  *
- * 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 <http://www.gnu.org/licenses/>.
  */
 
+
 #include "inspircd.h"
 #include <tds.h>
 #include <tdsconvert.h>
@@ -770,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)