summaryrefslogtreecommitdiff
path: root/modules/protocol/ngircd.cpp
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@lodoss.net>2013-08-07 23:44:58 +0100
committerFederico G. Schwindt <fgsch@lodoss.net>2013-08-07 23:44:58 +0100
commit9d6f88de39afe4ea870a03b66503a8241f8b9954 (patch)
tree350736b0f2b36b4588da3466550a4ff15072a07f /modules/protocol/ngircd.cpp
parentb93d650b1f63a0159a88404bd64f79311700b11d (diff)
Add certificate fingerprint support for ngIRCd
Diffstat (limited to 'modules/protocol/ngircd.cpp')
-rw-r--r--modules/protocol/ngircd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index d5513aab7..d32d87a73 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -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));
+ }
}
};