summaryrefslogtreecommitdiff
path: root/src/uplink.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 /src/uplink.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 'src/uplink.cpp')
-rw-r--r--src/uplink.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp
index 5b585ce09..91f9c6264 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -56,7 +56,7 @@ void Uplink::Connect()
new UplinkSocket();
if (!Config->GetBlock("serverinfo")->Get<Anope::string>("localhost").empty())
UplinkSock->Bind(Config->GetBlock("serverinfo")->Get<Anope::string>("localhost"));
- Event::OnPreServerConnect(&Event::PreServerConnect::OnPreServerConnect);
+ EventManager::Get()->Dispatch(&Event::PreServerConnect::OnPreServerConnect);
Anope::string ip = Anope::Resolve(u.host, u.ipv6 ? AF_INET6 : AF_INET);
Log(LOG_TERMINAL) << "Attempting to connect to uplink #" << (Anope::CurrentUplink + 1) << " " << u.host << " (" << ip << "), port " << u.port;
UplinkSock->Connect(ip, u.port);
@@ -82,7 +82,7 @@ UplinkSocket::~UplinkSocket()
if (IRCD && Servers::GetUplink() && Servers::GetUplink()->IsSynced())
{
- Event::OnServerDisconnect(&Event::ServerDisconnect::OnServerDisconnect);
+ EventManager::Get()->Dispatch(&Event::ServerDisconnect::OnServerDisconnect);
for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it)
{
@@ -149,7 +149,7 @@ void UplinkSocket::OnConnect()
{
Log(LOG_TERMINAL) << "Successfully connected to uplink #" << (Anope::CurrentUplink + 1) << " " << Config->Uplinks[Anope::CurrentUplink].host << ":" << Config->Uplinks[Anope::CurrentUplink].port;
IRCD->SendConnect();
- Event::OnServerConnect(&Event::ServerConnect::OnServerConnect);
+ EventManager::Get()->Dispatch(&Event::ServerConnect::OnServerConnect);
}
void UplinkSocket::OnError(const Anope::string &err)