diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-02 16:27:02 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-02 16:27:02 +0000 |
commit | 2b96ff2ed97cc2646b2790aa6a424caf073070c2 (patch) | |
tree | 3c62507ce75b82df835ae52b5662252d4015dcc7 | |
parent | 687531999ced9e457463b1a6de2bfcef97c6250c (diff) |
Don't use oncleanup to remove listmode lists
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5104 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/u_listmode.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h index ff62f2089..bc6a9fa20 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -90,23 +90,26 @@ class ListModeBase : public ModeHandler { for(modelist::iterator it = el->begin(); it != el->end(); it++) { - user->WriteServ( "%s %s %s %s %s %s", listnumeric.c_str(), user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str()); + user->WriteServ("%s %s %s %s %s %s", listnumeric.c_str(), user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str()); } } - user->WriteServ( "%s %s %s %s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str()); + user->WriteServ("%s %s %s %s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str()); } virtual void RemoveMode(chanrec* channel) { + ServerInstance->Log(DEBUG,"Removing listmode base from %s %s",channel->name,infokey.c_str()); modelist* el; channel->GetExt(infokey, el); if (el) { + ServerInstance->Log(DEBUG,"Channel is extended with a list"); char moderemove[MAXBUF]; userrec* n = new userrec(ServerInstance); n->SetFd(FD_MAGIC_NUMBER); for(modelist::iterator it = el->begin(); it != el->end(); it++) { + ServerInstance->Log(DEBUG,"Remove item %s",it->mask.c_str()); sprintf(moderemove,"-%c",this->GetModeChar()); const char* parameters[] = { channel->name, moderemove, it->mask.c_str() }; ServerInstance->SendMode(parameters, 3, n); @@ -300,19 +303,6 @@ class ListModeBase : public ModeHandler virtual void DoCleanup(int target_type, void* item) { - if (target_type == TYPE_CHANNEL) - { - chanrec* chan = (chanrec*)item; - - modelist* list; - chan->GetExt(infokey, list); - - if (list) - { - chan->Shrink(infokey); - delete list; - } - } } virtual bool ValidateParam(userrec* source, chanrec* channel, std::string ¶meter) |