diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-24 01:59:36 +0200 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-24 07:40:16 -0400 |
commit | fca9ec085e74efa005dd981f2af2a6d6fd78ce89 (patch) | |
tree | 3e6344b49d7a96e87f98ff18d990c69a7a0ae0ce /modules | |
parent | ef5c6684c71fda6837f4d217d4f61bb418523047 (diff) |
InspIRCd: Add handler for FIDENT to 2.0 protocol, so we know when someone changes ident on the network
Diffstat (limited to 'modules')
-rw-r--r-- | modules/protocol/inspircd20.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 1ebbc041f..c547a11d6 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -486,6 +486,17 @@ struct IRCDMessageEncap : IRCDMessage } }; +struct IRCDMessageFIdent : IRCDMessage +{ + IRCDMessageFIdent() : IRCDMessage("FIDENT", 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } + + bool Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override + { + source.GetUser()->SetIdent(params[0]); + return true; + } +}; + class ProtoInspIRCd : public Module { InspIRCd20Proto ircd_proto; @@ -526,6 +537,7 @@ class ProtoInspIRCd : public Module /* Our message handlers */ IRCDMessageCapab message_capab; IRCDMessageEncap message_encap; + IRCDMessageFIdent message_fident; void SendChannelMetadata(Channel *c, const Anope::string &metadataname, const Anope::string &value) { |