X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_reloadmodule.cpp;h=eac364f0e6487ae64e520437a2988c211d5efc86;hb=7ddef68f44ecb01f891e55a680078f7857fb866f;hp=ca972fd18875bab4f93d112fcead4982ce974ddd;hpb=dbf4d595433ecefeb61f1267ffa515a91c3ab548;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_reloadmodule.cpp b/src/commands/cmd_reloadmodule.cpp index ca972fd18..eac364f0e 100644 --- a/src/commands/cmd_reloadmodule.cpp +++ b/src/commands/cmd_reloadmodule.cpp @@ -1,16 +1,23 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2007 Robin Burchell * - * 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" class CommandReloadmodule : public Command @@ -43,6 +50,7 @@ class ReloadModuleWorker : public HandlerBase1 if (user) user->WriteNumeric(975, "%s %s :Module %ssuccessfully reloaded.", user->nick.c_str(), name.c_str(), result ? "" : "un"); + ServerInstance->GlobalCulls.AddItem(this); } }; @@ -58,7 +66,7 @@ CmdResult CommandReloadmodule::Handle (const std::vector& parameter Module* m = ServerInstance->Modules->Find(parameters[0]); if (m) { - ServerInstance->Modules->Reload(m, new ReloadModuleWorker(parameters[0], user->uuid)); + ServerInstance->Modules->Reload(m, (creator->dying ? NULL : new ReloadModuleWorker(user->uuid, parameters[0]))); return CMD_SUCCESS; } else