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 /src/servers.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 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index 9f94bc78e..1308147b7 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -51,7 +51,7 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano Burst(); } - Event::OnNewServer(&Event::NewServer::OnNewServer, this); + EventManager::Get()->Dispatch(&Event::NewServer::OnNewServer, this); } Server::~Server() @@ -86,7 +86,7 @@ void Server::Delete(const Anope::string &reason) { this->quit_reason = reason; this->quitting = true; - Event::OnServerQuit(&Event::ServerQuit::OnServerQuit, this); + EventManager::Get()->Dispatch(&Event::ServerQuit::OnServerQuit, this); delete this; } @@ -228,7 +228,7 @@ void Server::Sync(bool sync_links) Log(this, "sync") << "is done syncing"; - Event::OnServerSync(&Event::ServerSync::OnServerSync, this); + EventManager::Get()->Dispatch(&Event::ServerSync::OnServerSync, this); if (sync_links && !this->links.empty()) { @@ -240,7 +240,7 @@ void Server::Sync(bool sync_links) if (me) { - Event::OnPreUplinkSync(&Event::PreUplinkSync::OnPreUplinkSync, this); + EventManager::Get()->Dispatch(&Event::PreUplinkSync::OnPreUplinkSync, this); } for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end;) @@ -257,7 +257,7 @@ void Server::Sync(bool sync_links) IRCD->SendEOB(); Me->Sync(false); - Event::OnUplinkSync(&Event::UplinkSync::OnUplinkSync, this); + EventManager::Get()->Dispatch(&Event::UplinkSync::OnUplinkSync, this); if (!Anope::NoFork) { |