X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=ccd78a8f028c63d6790c04fa499a50c5d2ae9696;hb=16c80276ea6cba0d36da6f79a0fe7004b0e6f0ea;hp=600b4b0aa1982304766a073d21b4474a7ec70c07;hpb=9e9d024c29bc49f5e9045bd72d3db250773052c4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 600b4b0aa..ccd78a8f0 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -1,16 +1,29 @@ -/* +------------------------------------+ - * | 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) 2009-2010 Daniel De Graaf + * Copyright (C) 2007, 2009 Dennis Friis + * Copyright (C) 2003-2008 Craig Edwards + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2006-2007 Robin Burchell + * Copyright (C) 2006-2007 Oliver Lupton + * Copyright (C) 2007 Pippijn van Steenhoven + * Copyright (C) 2003 randomdan * - * 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 "xline.h" #include "socket.h" @@ -300,7 +313,7 @@ swap_now: for (unsigned int j = my_pos; j != swap_pos; j += incrmnt) { - if (( j + incrmnt > EventHandlers[i].size() - 1) || (j + incrmnt < 0)) + if ((j + incrmnt > EventHandlers[i].size() - 1) || ((incrmnt == -1) && (j == 0))) continue; std::swap(EventHandlers[i][j], EventHandlers[i][j+incrmnt]); @@ -423,8 +436,6 @@ bool InspIRCd::IsValidModuleCommand(const std::string &commandname, int pcnt, Us void ModuleManager::AddService(ServiceProvider& item) { - Module* owner = item.creator; - switch (item.service) { case SERVICE_COMMAND: