diff options
author | Adam <Adam@anope.org> | 2013-07-01 22:17:52 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-07-01 22:17:52 -0400 |
commit | 1a3d9a016d3adc49788bbff73aac9b3b5ea85b17 (patch) | |
tree | c0ecf92ed768473bc82ff64a7fce827245f37ba9 /modules/commands/cs_drop.cpp | |
parent | 518182ac9204f815258b0de91b3f884d8efa1502 (diff) |
Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module.
Diffstat (limited to 'modules/commands/cs_drop.cpp')
-rw-r--r-- | modules/commands/cs_drop.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 3f14aea65..adbe1f2ca 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -37,23 +37,20 @@ class CommandCSDrop : public Command return; } - if (ci->HasExt("SUSPENDED") && !source.HasCommand("chanserv/drop")) - { - source.Reply(CHAN_X_SUSPENDED, chan.c_str()); - return; - } - if ((ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")) && !source.HasCommand("chanserv/drop")) { source.Reply(ACCESS_DENIED); return; } + EventReturn MOD_RESULT; + FOREACH_RESULT(OnChanDrop, MOD_RESULT, (source, ci)); + if (MOD_RESULT == EVENT_STOP) + return; + bool override = (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")"; - FOREACH_MOD(OnChanDrop, (ci)); - Reference<Channel> c = ci->c; delete ci; |