mirror of
https://github.com/anope/anope.git
synced 2026-07-09 20:43:13 +02:00
Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
This commit is contained in:
@@ -39,8 +39,6 @@ class MemoServCore : public Module, public MemoServService
|
||||
MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR),
|
||||
MemoServService(this)
|
||||
{
|
||||
Implementation i[] = { I_OnNickCoreCreate, I_OnCreateChan, I_OnReload, I_OnBotDelete, I_OnNickIdentify, I_OnJoinChannel, I_OnUserAway, I_OnNickUpdate, I_OnPreHelp, I_OnPostHelp };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
MemoResult Send(const Anope::string &source, const Anope::string &target, const Anope::string &message, bool force) anope_override
|
||||
@@ -76,7 +74,7 @@ class MemoServCore : public Module, public MemoServService
|
||||
m->text = message;
|
||||
m->unread = true;
|
||||
|
||||
FOREACH_MOD(I_OnMemoSend, OnMemoSend(source, target, mi, m));
|
||||
FOREACH_MOD(OnMemoSend, (source, target, mi, m));
|
||||
|
||||
if (ischan)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user