diff options
| author | 2022-08-10 14:46:05 +0100 | |
|---|---|---|
| committer | 2022-08-10 14:46:05 +0100 | |
| commit | ff28fd38e5cc13be1a2f61898e7f930139bf82e6 (patch) | |
| tree | 5c467861f9b31632f11cd1060c818a05920b4374 /src/users.cpp | |
| parent | Update the Windows dependencies. (diff) | |
Fix some harmless debug messages when initializing remote users.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 737995f46..227a6897e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -765,7 +765,7 @@ irc::sockets::cidr_mask User::GetCIDRMask() bool User::SetClientIP(const std::string& address) { irc::sockets::sockaddrs sa; - if (!irc::sockets::aptosa(address, client_sa.port(), sa)) + if (!irc::sockets::aptosa(address, client_sa.family() == AF_UNSPEC ? 0 : client_sa.port(), sa)) return false; User::SetClientIP(sa); @@ -774,7 +774,7 @@ bool User::SetClientIP(const std::string& address) void User::SetClientIP(const irc::sockets::sockaddrs& sa) { - const std::string oldip(GetIPString()); + const std::string oldip(client_sa.family() == AF_UNSPEC ? "" : GetIPString()); memcpy(&client_sa, &sa, sizeof(irc::sockets::sockaddrs)); this->InvalidateCache(); |
