mirror of
https://github.com/anope/anope.git
synced 2026-06-29 19:36:37 +02:00
Fix some modules that weren't converted to the new socket ctor.
Closes #330.
This commit is contained in:
+4
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -289,7 +289,7 @@ class MyHTTPProvider : public HTTPProvider, public Timer
|
||||
std::list<Reference<MyHTTPClient> > clients;
|
||||
|
||||
public:
|
||||
MyHTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, const int t, bool s) : Socket(-1, i.find(':') != Anope::string::npos), HTTPProvider(c, n, i, p, s), Timer(c, 10, Anope::CurTime, true), timeout(t) { }
|
||||
MyHTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, const int t, bool s) : Socket(-1, i.find(':') == Anope::string::npos ? AF_INET : AF_INET6), HTTPProvider(c, n, i, p, s), Timer(c, 10, Anope::CurTime, true), timeout(t) { }
|
||||
|
||||
void Tick(time_t) override
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ class ProxyCallbackListener : public ListenSocket
|
||||
};
|
||||
|
||||
public:
|
||||
ProxyCallbackListener(const Anope::string &b, int p) : Socket(-1, b.find(':') != Anope::string::npos), ListenSocket(b, p, false)
|
||||
ProxyCallbackListener(const Anope::string &b, int p) : Socket(-1, b.find(':') == Anope::string::npos ? AF_INET : AF_INET6), ListenSocket(b, p, false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ class RedisSocket : public BinarySocket, public ConnectionSocket
|
||||
std::deque<Interface *> interfaces;
|
||||
std::map<Anope::string, Interface *> subinterfaces;
|
||||
|
||||
RedisSocket(MyRedisService *pro, bool v6) : Socket(-1, v6), provider(pro) { }
|
||||
RedisSocket(MyRedisService *pro, bool v6) : Socket(-1, v6 ? AF_INET6 : AF_INET), provider(pro) { }
|
||||
|
||||
~RedisSocket() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user