diff options
author | Adam <Adam@anope.org> | 2016-07-28 21:29:35 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-07-28 21:29:35 -0400 |
commit | 0e758a2ac23dc4a001e8e126cec14588da9a9769 (patch) | |
tree | 45df813323e023c5c89db7279426c4ad0943b4a9 /modules/hostserv/set.cpp | |
parent | a3c8afae00c54d5b95c620248b51f90679d7d53f (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/hostserv/set.cpp')
-rw-r--r-- | modules/hostserv/set.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/hostserv/set.cpp b/modules/hostserv/set.cpp index a86afead4..e7f42e630 100644 --- a/modules/hostserv/set.cpp +++ b/modules/hostserv/set.cpp @@ -86,7 +86,7 @@ class CommandHSSet : public Command Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->GetNick() << " to " << (!user.empty() ? user + "@" : "") << host; na->SetVhost(user, host, source.GetNick()); - Event::OnSetVhost(&Event::SetVhost::OnSetVhost, na); + EventManager::Get()->Dispatch(&Event::SetVhost::OnSetVhost, na); if (!user.empty()) source.Reply(_("Vhost for \002{0}\002 set to \002{0}\002@\002{1}\002."), nick, user, host); else @@ -107,7 +107,7 @@ class CommandHSSetAll : public Command if (!na || !na->HasVhost()) return; - for (NickServ::Nick *nick : na->GetAccount()->GetRefs<NickServ::Nick *>(NickServ::nick)) + for (NickServ::Nick *nick : na->GetAccount()->GetRefs<NickServ::Nick *>()) nick->SetVhost(na->GetVhostIdent(), na->GetVhostHost(), na->GetVhostCreator()); } @@ -184,7 +184,7 @@ class CommandHSSetAll : public Command na->SetVhost(user, host, source.GetNick()); this->Sync(na); - Event::OnSetVhost(&Event::SetVhost::OnSetVhost, na); + EventManager::Get()->Dispatch(&Event::SetVhost::OnSetVhost, na); if (!user.empty()) source.Reply(_("Vhost for group \002{0}\002 set to \002{1}\002@\002{2}\002."), nick.c_str(), user.c_str(), host.c_str()); else |