summaryrefslogtreecommitdiff
path: root/src/uplink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uplink.cpp')
-rw-r--r--src/uplink.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp
index 80727487a..12b6c94f9 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -15,6 +15,7 @@
#include "config.h"
#include "protocol.h"
#include "servers.h"
+#include "event.h"
UplinkSocket *UplinkSock = NULL;
@@ -52,7 +53,7 @@ void Uplink::Connect()
new UplinkSocket();
if (!Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost").empty())
UplinkSock->Bind(Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost"));
- FOREACH_MOD(OnPreServerConnect, ());
+ Event::OnPreServerConnect(&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);
@@ -67,7 +68,7 @@ UplinkSocket::~UplinkSocket()
{
if (IRCD && Servers::GetUplink() && Servers::GetUplink()->IsSynced())
{
- FOREACH_MOD(OnServerDisconnect, ());
+ Event::OnServerDisconnect(&Event::ServerDisconnect::OnServerDisconnect);
for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it)
{
@@ -133,7 +134,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();
- FOREACH_MOD(OnServerConnect, ());
+ Event::OnServerConnect(&Event::ServerConnect::OnServerConnect);
}
void UplinkSocket::OnError(const Anope::string &error)