summaryrefslogtreecommitdiff
path: root/modules/commands/cs_info.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/commands/cs_info.cpp
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'modules/commands/cs_info.cpp')
-rw-r--r--modules/commands/cs_info.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 06130f15e..d0ae17a7e 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -10,11 +10,14 @@
*/
#include "module.h"
+#include "modules/cs_info.h"
class CommandCSInfo : public Command
{
+ EventHandlers<Event::ChanInfo> &eventonchaninfo;
+
public:
- CommandCSInfo(Module *creator) : Command(creator, "chanserv/info", 1, 2)
+ CommandCSInfo(Module *creator, EventHandlers<Event::ChanInfo> &event) : Command(creator, "chanserv/info", 1, 2), eventonchaninfo(event)
{
this->SetDesc(_("Lists information about the named registered channel"));
this->SetSyntax(_("\037channel\037"));
@@ -60,7 +63,7 @@ class CommandCSInfo : public Command
info[_("Ban type")] = stringify(ci->bantype);
}
- FOREACH_MOD(OnChanInfo, (source, ci, info, show_all));
+ this->eventonchaninfo(&Event::ChanInfo::OnChanInfo, source, ci, info, show_all);
std::vector<Anope::string> replies;
info.Process(replies);
@@ -86,10 +89,12 @@ class CommandCSInfo : public Command
class CSInfo : public Module
{
CommandCSInfo commandcsinfo;
+ EventHandlers<Event::ChanInfo> eventonchaninfo;
public:
- CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
- commandcsinfo(this)
+ CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
+ , commandcsinfo(this, eventonchaninfo)
+ , eventonchaninfo(this, "OnChanInfo")
{
}