diff options
Diffstat (limited to 'src/module.cpp')
-rw-r--r-- | src/module.cpp | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/module.cpp b/src/module.cpp index 97cf717de..aa46a6f63 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -40,81 +40,6 @@ Module::~Module() /* Clear any active callbacks this module has */ ModuleManager::ClearCallBacks(this); - /** - * ok, im going to walk every hash looking for commands we own, now, not exactly elegant or efficiant :) - **/ - if (HostServ) - { - for (CommandMap::iterator it = HostServ->Commands.begin(), it_end = HostServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(HostServ, c); - } - } - - if (BotServ) - { - for (CommandMap::iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(BotServ, c); - } - } - - if (MemoServ) - { - for (CommandMap::iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(MemoServ, c); - } - } - - if (NickServ) - { - for (CommandMap::iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(NickServ, c); - } - } - - if (ChanServ) - { - for (CommandMap::iterator it = ChanServ->Commands.begin(), it_end = ChanServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(ChanServ, c); - } - } - - if (OperServ) - { - for (CommandMap::iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; ) - { - Command *c = it->second; - ++it; - - if (c->module == this) - this->DelCommand(OperServ, c); - } - } - std::list<Module *>::iterator it = std::find(Modules.begin(), Modules.end(), this); if (it != Modules.end()) Modules.erase(it); |