diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-18 02:57:46 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-18 02:57:46 +0000 |
commit | e50d016aa23083f81dcf181f68edb81c5b23c78d (patch) | |
tree | 2f627c4d456ec360a05c013832142df187e193d6 /src/modules | |
parent | 93a78a57ada6d5dab410c2bd3c4b02f4fa15684c (diff) |
Cull channels, warn when Extensible objects are not culled as they must be
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11901 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_channames.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_cycle.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_remove.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_sakick.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_sapart.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_spanningtree/svspart.cpp | 3 |
7 files changed, 8 insertions, 17 deletions
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index ba03f9af5..c137d0e71 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -81,8 +81,8 @@ class ModuleChannelNames : public Module } const UserMembList* users = c->GetUsers(); for(UserMembCIter j = users->begin(); j != users->end(); ++j) - if (IS_LOCAL(j->first) && !c->ServerKickUser(j->first, "Channel name no longer valid", NULL)) - delete c; + if (IS_LOCAL(j->first)) + c->ServerKickUser(j->first, "Channel name no longer valid", NULL); } badchan = false; } diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index dec806b5b..fafdc336c 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -57,9 +57,7 @@ class CommandCycle : public Command return CMD_FAILURE; } - /* XXX in the future, this may move to a static Channel method (the delete.) -- w00t */ - if (!channel->PartUser(user, reason)) - delete channel; + channel->PartUser(user, reason); Channel::JoinUser(user, parameters[0].c_str(), true, "", false, ServerInstance->Time()); } diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index bf124839a..9bc0f362f 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -234,10 +234,7 @@ class ModuleMsgFlood : public Module char kickmessage[MAXBUF]; snprintf(kickmessage, MAXBUF, "Channel flood triggered (limit is %d lines in %d secs)", f->lines, f->secs); - if (!dest->ServerKickUser(user, kickmessage)) - { - delete dest; - } + dest->ServerKickUser(user, kickmessage); return MOD_RES_DENY; } diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 67f81fc65..1bbc0931f 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -106,8 +106,7 @@ class RemoveBase : public Command channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str()); target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str()); - if (!channel->PartUser(target, reason)) - delete channel; + channel->PartUser(target, reason); } else { diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp index 57783be8f..b81df75c6 100644 --- a/src/modules/m_sakick.cpp +++ b/src/modules/m_sakick.cpp @@ -56,8 +56,7 @@ class CommandSakick : public Command */ if (IS_LOCAL(dest)) { - if (!channel->ServerKickUser(dest, reason, servername)) - delete channel; + channel->ServerKickUser(dest, reason, servername); Channel *n = ServerInstance->FindChan(parameters[1]); if (n && n->HasUser(dest)) diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 32a2e16fc..8f0a9e551 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -49,8 +49,7 @@ class CommandSapart : public Command */ if (IS_LOCAL(dest)) { - if (!channel->PartUser(dest, reason)) - delete channel; + channel->PartUser(dest, reason); Channel* n = ServerInstance->FindChan(parameters[1]); if (!n) diff --git a/src/modules/m_spanningtree/svspart.cpp b/src/modules/m_spanningtree/svspart.cpp index cc49aa72e..2a34d23c6 100644 --- a/src/modules/m_spanningtree/svspart.cpp +++ b/src/modules/m_spanningtree/svspart.cpp @@ -40,8 +40,7 @@ bool TreeSocket::ServicePart(const std::string &prefix, parameterlist ¶ms) { /* only part if it's local, otherwise just pass it on! */ if (IS_LOCAL(u)) - if (!c->PartUser(u, reason)) - delete c; + c->PartUser(u, reason); Utils->DoOneToAllButSender(prefix,"SVSPART",params,prefix); } |