1
0
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:
Adam
2013-05-27 19:36:37 -04:00
parent c21e8d9204
commit 37b3535543
120 changed files with 440 additions and 672 deletions
-1
View File
@@ -554,7 +554,6 @@ class ProtoBahamut : public Module
this->AddModes();
ModuleManager::Attach(I_OnUserNickChange, this);
}
void OnUserNickChange(User *u, const Anope::string &) anope_override
+2 -4
View File
@@ -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");
-1
View File
@@ -610,7 +610,6 @@ public:
{
this->AddModes();
ModuleManager::Attach(I_OnUserNickChange, this);
if (Me->GetSID() == Me->GetName())
Me->SetSID(Servers::TS6_SID_Retrieve());
+1 -3
View File
@@ -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");
+1 -3
View File
@@ -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()
-2
View File
@@ -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
+1 -1
View File
@@ -202,7 +202,7 @@ struct IRCDMessageEncap : IRCDMessage
if (u)
{
u->fingerprint = params[3];
FOREACH_MOD(I_OnFingerprint, OnFingerprint(u));
FOREACH_MOD(OnFingerprint, (u));
}
}
return;
+1 -3
View File
@@ -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);
}