mirror of
https://github.com/anope/anope.git
synced 2026-07-01 07:36:38 +02:00
Also fixed m_proxyscan to handle users with invalid ips
This commit is contained in:
@@ -346,10 +346,17 @@ class ModuleProxyScan : public Module
|
||||
if (exempt || !user || !Me->IsSynced() || !user->server->IsSynced())
|
||||
return;
|
||||
|
||||
sockaddrs user_ip(user->ip);
|
||||
/* At this time we only support IPv4 */
|
||||
if (user_ip.sa.sa_family != AF_INET)
|
||||
sockaddrs user_ip;
|
||||
try
|
||||
{
|
||||
user_ip.pton(AF_INET, user->ip);
|
||||
}
|
||||
catch (const SocketException &)
|
||||
{
|
||||
/* User doesn't have a valid IPv4 IP (ipv6/spoof/etc) */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this->con_notice.empty() && !this->con_source.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user