mirror of
https://github.com/anope/anope.git
synced 2026-07-08 11:23:13 +02:00
Changed the OnChanDrop event to be called right before channels are dropped, not after
This commit is contained in:
+3
-3
@@ -586,10 +586,10 @@ class CoreExport Module : public Extensible
|
||||
*/
|
||||
virtual void OnLevelChange(User *u, ChannelInfo *ci, const Anope::string &priv, int16_t what) { }
|
||||
|
||||
/** Called when a channel is dropped
|
||||
* @param chname The channel name
|
||||
/** Called right before a channel is dropped
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanDrop(const Anope::string &chname) { }
|
||||
virtual void OnChanDrop(ChannelInfo *ci) { }
|
||||
|
||||
/** Called when a channel is registered
|
||||
* @param ci The channel
|
||||
|
||||
@@ -56,6 +56,8 @@ class CommandCSDrop : public Command
|
||||
bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv("FOUNDER"));
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
|
||||
|
||||
FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci));
|
||||
|
||||
Channel *c = ci->c;
|
||||
delete ci;
|
||||
|
||||
@@ -64,8 +66,6 @@ class CommandCSDrop : public Command
|
||||
if (c)
|
||||
c->CheckModes();
|
||||
|
||||
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user