From 26ac315192e0d8a04d50e910697ab794eedf0cc1 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Apr 2014 14:35:14 -0400 Subject: New event system --- modules/commands/hs_group.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/commands/hs_group.cpp') diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index ca3aa9742..eb1c6d299 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -10,6 +10,7 @@ */ #include "module.h" +#include "modules/ns_group.h" class CommandHSGroup : public Command { @@ -31,7 +32,7 @@ class CommandHSGroup : public Command if (nick) { nick->SetVhost(na->GetVhostIdent(), na->GetVhostHost(), na->GetVhostCreator()); - FOREACH_MOD(OnSetVhost, (nick)); + Event::OnSetVhost(&Event::SetVhost::OnSetVhost, nick); } } setting = false; @@ -77,14 +78,18 @@ class CommandHSGroup : public Command }; class HSGroup : public Module + , public EventHook + , public EventHook { CommandHSGroup commandhsgroup; bool syncongroup; bool synconset; public: - HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - commandhsgroup(this) + HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) + , EventHook("OnSetVhost") + , EventHook("OnNickGroup") + , commandhsgroup(this) { } -- cgit