summaryrefslogtreecommitdiff
path: root/src/uplink.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2022-12-15 13:07:22 +0000
committerSadie Powell <sadie@witchery.services>2022-12-17 11:50:38 +0000
commitdfdcd3021a482182827ba00782acd5a53442d21a (patch)
treea1fc48af8de2c732a6222c7db9e1c9018de0b785 /src/uplink.cpp
parent5fa3d8f9297f50e25a7bad6a9bde91b9024330de (diff)
Add support for linking over UNIX sockets.
Diffstat (limited to 'src/uplink.cpp')
-rw-r--r--src/uplink.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp
index 03d8d99f1..db58d71b0 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -52,12 +52,12 @@ void Uplink::Connect()
if (!Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost").empty())
UplinkSock->Bind(Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost"));
FOREACH_MOD(OnPreServerConnect, ());
- Anope::string ip = Anope::Resolve(u.host, u.ipv6 ? AF_INET6 : AF_INET);
+ Anope::string ip = Anope::Resolve(u.host, u.protocol);
Log(LOG_TERMINAL) << "Attempting to connect to uplink #" << (Anope::CurrentUplink + 1) << " " << u.host << " (" << ip << '/' << u.port << ") with protocol " << IRCD->GetProtocolName();
UplinkSock->Connect(ip, u.port);
}
-UplinkSocket::UplinkSocket() : Socket(-1, Config->Uplinks[Anope::CurrentUplink].ipv6), ConnectionSocket(), BufferedSocket()
+UplinkSocket::UplinkSocket() : Socket(-1, Config->Uplinks[Anope::CurrentUplink].protocol), ConnectionSocket(), BufferedSocket()
{
error = false;
UplinkSock = this;