diff options
author | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
commit | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch) | |
tree | b9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/commands/ns_set_misc.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'modules/commands/ns_set_misc.cpp')
-rw-r--r-- | modules/commands/ns_set_misc.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index 73e3b169a..bf3ea8660 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -11,6 +11,8 @@ #include "module.h" #include "modules/set_misc.h" +#include "modules/ns_info.h" +#include "modules/ns_set.h" static Module *me; @@ -112,8 +114,7 @@ class CommandNSSetMisc : public Command } NickCore *nc = na->nc; - EventReturn MOD_RESULT; - FOREACH_RESULT(OnSetNickOption, MOD_RESULT, (source, this, nc, param)); + EventReturn MOD_RESULT = Event::OnSetNickOption(&Event::SetNickOption::OnSetNickOption, source, this, nc, param); if (MOD_RESULT == EVENT_STOP) return; @@ -176,14 +177,18 @@ class CommandNSSASetMisc : public CommandNSSetMisc }; class NSSetMisc : public Module + , public EventHook<Event::NickInfo> { CommandNSSetMisc commandnssetmisc; CommandNSSASetMisc commandnssasetmisc; Serialize::Type nsmiscdata_type; public: - NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - commandnssetmisc(this), commandnssasetmisc(this), nsmiscdata_type("NSMiscData", NSMiscData::Unserialize) + NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) + , EventHook<Event::NickInfo>("OnNickInfo") + , commandnssetmisc(this) + , commandnssasetmisc(this) + , nsmiscdata_type("NSMiscData", NSMiscData::Unserialize) { me = this; } |