summaryrefslogtreecommitdiff
path: root/modules/core/cs_drop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/cs_drop.cpp')
-rw-r--r--modules/core/cs_drop.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp
index 608fe3664..4ac066927 100644
--- a/modules/core/cs_drop.cpp
+++ b/modules/core/cs_drop.cpp
@@ -53,8 +53,6 @@ class CommandCSDrop : public Command
return MOD_CONT;
}
- int level = get_access(u, ci);
-
if (ci->c && ModeManager::FindChannelModeByName(CMODE_REGISTERED))
ci->c->RemoveMode(NULL, CMODE_REGISTERED, "", false);
@@ -64,16 +62,13 @@ class CommandCSDrop : public Command
ircdproto->SendSQLineDel(&x);
}
- Alog() << Config->s_ChanServ << ": Channel " << ci->name << " dropped by " << u->GetMask() << " (founder: " << (ci->founder ? ci->founder->display : "(none)") << ")";
+ bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER));
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "founder: " << (ci->founder ? ci->founder->display : "none");
+ if (override)
+ ircdproto->SendGlobops(ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
delete ci;
- /* We must make sure that the Services admin has not normally the right to
- * drop the channel before issuing the wallops.
- */
- if (Config->WallDrop && (level < ACCESS_FOUNDER || (!IsFounder(u, ci) && ci->HasFlag(CI_SECUREFOUNDER))))
- ircdproto->SendGlobops(ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick.c_str(), chan.c_str());
-
notice_lang(Config->s_ChanServ, u, CHAN_DROPPED, chan.c_str());
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));