1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 21:26:37 +02:00

Merge pull request #18 from fgsch/1.9

Add certificate fingerprint support for ngIRCd
This commit is contained in:
Adam
2013-08-10 14:26:27 -07:00
+7
View File
@@ -19,6 +19,7 @@ class ngIRCdProto : public IRCDProto
ngIRCdProto(Module *creator) : IRCDProto(creator, "ngIRCd")
{
DefaultPseudoclientModes = "+oi";
CanCertFP = true;
CanSVSNick = true;
CanSetVHost = true;
CanSetVIdent = true;
@@ -315,6 +316,7 @@ struct IRCDMessageMetadata : IRCDMessage
* - "cloakhost" : the cloaked hostname of a client
* - "info": info text ("real name") of a client
* - "user": the user name (ident) of a client (can't be empty)
* - "certfp": the certificate fingerprint of a client
*/
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
@@ -342,6 +344,11 @@ struct IRCDMessageMetadata : IRCDMessage
{
u->SetVIdent(params[2]);
}
else if (params[1].equals_cs("certfp"))
{
u->fingerprint = params[2];
FOREACH_MOD(OnFingerprint, (u));
}
}
};