diff options
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); } |