Skip to content

Commit

Permalink
Revert "users: add SetClientIP function for irc::sockets::sockaddrs t…
Browse files Browse the repository at this point in the history
…ype."

This reverts commit f047427.
  • Loading branch information
rburchell committed Jul 1, 2012
1 parent 433044e commit 59dc6b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
5 changes: 0 additions & 5 deletions include/users.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
14 changes: 1 addition & 13 deletions src/users.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 59dc6b0

Please sign in to comment.