mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Revert "users: add SetClientIP function for irc::sockets::sockaddrs type."
This reverts commit f0474272303ac9297f637ce956315518138bafff.
This commit is contained in:
parent
433044e8fc
commit
59dc6b0ec2
@ -395,11 +395,6 @@ class CoreExport User : public Extensible
|
||||
*/
|
||||
bool SetClientIP(const char* sip);
|
||||
|
||||
/** Sets the client IP for this user
|
||||
* @return true always
|
||||
*/
|
||||
bool SetClientIP(irc::sockets::sockaddrs *sa);
|
||||
|
||||
/** Constructor
|
||||
* @throw CoreException if the UID allocated to the user already exists
|
||||
*/
|
||||
|
@ -977,22 +977,10 @@ irc::sockets::cidr_mask User::GetCIDRMask()
|
||||
return irc::sockets::cidr_mask(client_sa, range);
|
||||
}
|
||||
|
||||
bool User::SetClientIP(irc::sockets::sockaddrs *sa)
|
||||
{
|
||||
memcpy(&client_sa, sa, sizeof(irc::sockets::sockaddrs));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool User::SetClientIP(const char* sip)
|
||||
{
|
||||
irc::sockets::sockaddrs sa;
|
||||
|
||||
this->cachedip = "";
|
||||
if (!irc::sockets::aptosa(sip, 0, sa))
|
||||
return false;
|
||||
|
||||
return SetClientIP(&sa);
|
||||
return irc::sockets::aptosa(sip, 0, client_sa);
|
||||
}
|
||||
|
||||
static std::string wide_newline("\r\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user