diff options
author | Sadie Powell <sadie@witchery.services> | 2023-11-26 13:26:38 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2023-11-26 13:26:38 +0000 |
commit | 2d2d1972e965ff41b9e79a53b2bc7e739f798000 (patch) | |
tree | 7e99842e03c78ee6db7d940de586b71eed5abe67 /modules/m_dns.cpp | |
parent | 2b21264fb02e59662365ae4aa4f88647b4ea4dc8 (diff) |
Fix some modules that weren't converted to the new socket ctor.
Closes #330.
Diffstat (limited to 'modules/m_dns.cpp')
-rw-r--r-- | modules/m_dns.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index 525e8637d..59f1adb79 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -541,7 +541,7 @@ class TCPSocket : public ListenSocket } }; - TCPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') != Anope::string::npos), ListenSocket(ip, port, ip.find(':') != Anope::string::npos), manager(m) { } + TCPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') == Anope::string::npos ? AF_INET : AF_INET6), ListenSocket(ip, port, ip.find(':') != Anope::string::npos), manager(m) { } ClientSocket *OnAccept(int fd, const sockaddrs &addr) override { @@ -556,7 +556,7 @@ class UDPSocket : public ReplySocket std::deque<Packet *> packets; public: - UDPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') != Anope::string::npos, SOCK_DGRAM), manager(m) { } + UDPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') == Anope::string::npos ? AF_INET : AF_INET6, SOCK_DGRAM), manager(m) { } ~UDPSocket() override { @@ -614,7 +614,7 @@ class NotifySocket : public Socket { Packet *packet; public: - NotifySocket(bool v6, Packet *p) : Socket(-1, v6, SOCK_DGRAM), packet(p) + NotifySocket(int family, Packet *p) : Socket(-1, family, SOCK_DGRAM), packet(p) { SocketEngine::Change(this, false, SF_READABLE); SocketEngine::Change(this, true, SF_WRITABLE); @@ -942,7 +942,7 @@ class MyManager : public Manager, public Timer packet->questions.emplace_back(zone, QUERY_SOA); - new NotifySocket(ip.find(':') != Anope::string::npos, packet); + new NotifySocket(ip.find(':') == Anope::string::npos ? AF_INET : AF_INET6, packet); } } |