summaryrefslogtreecommitdiff
path: root/modules/chanserv/info.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-07-28 21:29:35 -0400
committerAdam <Adam@anope.org>2016-07-28 21:29:35 -0400
commit0e758a2ac23dc4a001e8e126cec14588da9a9769 (patch)
tree45df813323e023c5c89db7279426c4ad0943b4a9 /modules/chanserv/info.cpp
parenta3c8afae00c54d5b95c620248b51f90679d7d53f (diff)
Allow serializable fields to use storage in the respective objects.
Split service management code nito a proper servicemanager. Make service references managed instead of lazy lookup. Also made events and serializable use service manager instead of their respective systems for management
Diffstat (limited to 'modules/chanserv/info.cpp')
-rw-r--r--modules/chanserv/info.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/chanserv/info.cpp b/modules/chanserv/info.cpp
index 4f3895cc4..c48368598 100644
--- a/modules/chanserv/info.cpp
+++ b/modules/chanserv/info.cpp
@@ -14,10 +14,8 @@
class CommandCSInfo : public Command
{
- EventHandlers<Event::ChanInfo> &eventonchaninfo;
-
public:
- CommandCSInfo(Module *creator, EventHandlers<Event::ChanInfo> &event) : Command(creator, "chanserv/info", 1, 2), eventonchaninfo(event)
+ CommandCSInfo(Module *creator) : Command(creator, "chanserv/info", 1, 2)
{
this->SetDesc(_("Lists information about the specified registered channel"));
this->SetSyntax(_("\037channel\037"));
@@ -63,7 +61,7 @@ class CommandCSInfo : public Command
info[_("Ban type")] = stringify(ci->GetBanType());
}
- this->eventonchaninfo(&Event::ChanInfo::OnChanInfo, source, ci, info, show_all);
+ EventManager::Get()->Dispatch(&Event::ChanInfo::OnChanInfo, source, ci, info, show_all);
std::vector<Anope::string> replies;
info.Process(replies);
@@ -83,12 +81,10 @@ 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, eventonchaninfo)
- , eventonchaninfo(this)
+ , commandcsinfo(this)
{
}