summaryrefslogtreecommitdiff
path: root/modules/protocol/ngircd.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
committerAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
commit26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch)
treeb9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/protocol/ngircd.cpp
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'modules/protocol/ngircd.cpp')
-rw-r--r--modules/protocol/ngircd.cpp45
1 files changed, 34 insertions, 11 deletions
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index 998d83921..06790b2af 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -352,7 +352,7 @@ struct IRCDMessageMetadata : IRCDMessage
else if (params[1].equals_cs("certfp"))
{
u->fingerprint = params[2];
- FOREACH_MOD(OnFingerprint, (u));
+ Event::OnFingerprint(&Event::Fingerprint::OnFingerprint, u);
}
else if (params[1].equals_cs("cloakhost"))
{
@@ -586,6 +586,7 @@ struct IRCDMessageTopic : IRCDMessage
class ProtongIRCd : public Module
+ , public EventHook<Event::UserNickChange>
{
ngIRCdProto ircd_proto;
@@ -666,16 +667,38 @@ class ProtongIRCd : public Module
}
public:
- ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR),
- ircd_proto(this),
- message_capab(this), message_error(this), message_invite(this), message_kick(this), message_kill(this),
- message_motd(this), message_notice(this), message_part(this), message_ping(this), message_privmsg(this),
- message_squery(this, "SQUERY"), message_quit(this), message_squit(this), message_stats(this), message_time(this),
- message_version(this), message_whois(this),
-
- message_005(this), message_376(this), message_chaninfo(this), message_join(this), message_metadata(this),
- message_mode(this), message_nick(this), message_njoin(this), message_pong(this), message_server(this),
- message_topic(this)
+ ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR)
+ , EventHook<Event::UserNickChange>("OnUserNickChange")
+ , ircd_proto(this)
+ , message_capab(this)
+ , message_error(this)
+ , message_invite(this)
+ , message_kick(this)
+ , message_kill(this)
+ , message_motd(this)
+ , message_notice(this)
+ , message_part(this)
+ , message_ping(this)
+ , message_privmsg(this)
+ , message_squery(this, "SQUERY")
+ , message_quit(this)
+ , message_squit(this)
+ , message_stats(this)
+ , message_time(this)
+ , message_version(this)
+ , message_whois(this)
+
+ , message_005(this)
+ , message_376(this)
+ , message_chaninfo(this)
+ , message_join(this)
+ , message_metadata(this)
+ , message_mode(this)
+ , message_nick(this)
+ , message_njoin(this)
+ , message_pong(this)
+ , message_server(this)
+ , message_topic(this)
{
Servers::Capab.insert("QS");