mirror of
https://github.com/anope/anope.git
synced 2026-07-07 22:23:14 +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:
@@ -554,7 +554,6 @@ class ProtoBahamut : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
|
||||
@@ -171,7 +171,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
if (params[1] == "CERTFP")
|
||||
{
|
||||
u->fingerprint = params[2];
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
/*
|
||||
* Received: :42X ENCAP * SASL 42XAAAAAH * S PLAIN
|
||||
@@ -257,7 +257,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new CharybdisSASLIdentifyRequest(this->owner, source, params[2], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -419,8 +419,6 @@ class ProtoCharybdis : public Module
|
||||
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnChannelSync, I_OnMLock, I_OnUnMLock };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
if (ModuleManager::LoadModule("ratbox", User::Find(creator)) != MOD_ERR_OK)
|
||||
throw ModuleException("Unable to load ratbox");
|
||||
|
||||
@@ -610,7 +610,6 @@ public:
|
||||
{
|
||||
this->AddModes();
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
|
||||
if (Me->GetSID() == Me->GetName())
|
||||
Me->SetSID(Servers::TS6_SID_Retrieve());
|
||||
|
||||
@@ -953,7 +953,7 @@ struct IRCDMessageMetadata : IRCDMessage
|
||||
if ((pos2 - pos1) >= 32) // inspircd supports md5 and sha1 fingerprint hashes -> size 32 or 40 bytes.
|
||||
{
|
||||
u->fingerprint = data.substr(pos1, pos2 - pos1);
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1213,8 +1213,6 @@ class ProtoInspIRCd : public Module
|
||||
message_setident(this), message_server(this), message_time(this), message_uid(this)
|
||||
{
|
||||
|
||||
Implementation i[] = { I_OnUserNickChange };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
Servers::Capab.insert("NOQUIT");
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new InspIRCDSASLIdentifyRequest(this->owner, params[2], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -790,8 +790,6 @@ class ProtoInspIRCd : public Module
|
||||
throw ModuleException("No protocol interface for insp12");
|
||||
ModuleManager::DetachAll(m_insp12);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserNickChange, I_OnChannelSync, I_OnChanRegistered, I_OnDelChan, I_OnMLock, I_OnUnMLock, I_OnSetChannelOption };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
~ProtoInspIRCd()
|
||||
|
||||
@@ -656,8 +656,6 @@ class ProtongIRCd : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
Implementation i[] = { I_OnUserNickChange };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const Anope::string &) anope_override
|
||||
|
||||
@@ -202,7 +202,7 @@ struct IRCDMessageEncap : IRCDMessage
|
||||
if (u)
|
||||
{
|
||||
u->fingerprint = params[3];
|
||||
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
|
||||
FOREACH_MOD(OnFingerprint, (u));
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -920,7 +920,7 @@ struct IRCDMessageSASL : IRCDMessage
|
||||
return;
|
||||
|
||||
IdentifyRequest *req = new UnrealSASLIdentifyRequest(this->owner, params[1], acc, pass);
|
||||
FOREACH_MOD(I_OnCheckAuthentication, OnCheckAuthentication(NULL, req));
|
||||
FOREACH_MOD(OnCheckAuthentication, (NULL, req));
|
||||
req->Dispatch();
|
||||
}
|
||||
}
|
||||
@@ -1211,8 +1211,6 @@ class ProtoUnreal : public Module
|
||||
|
||||
this->AddModes();
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnUserNickChange, I_OnChannelSync, I_OnChanRegistered, I_OnDelChan, I_OnMLock, I_OnUnMLock };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
ModuleManager::SetPriority(this, PRIORITY_FIRST);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user