mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Tie in blacklist code.
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
|
||||
SETUP_LOGN (WSConnection, "WSConnection")
|
||||
|
||||
static std::string trimIP(const std::string& ip)
|
||||
{ // Make sure there's no port
|
||||
size_t pos = ip.find(':');
|
||||
return (pos == std::string::npos) ? ip : ip.substr(0, pos - 1);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
WSConnection::WSConnection (InfoSub::Source& source, bool isPublic,
|
||||
@@ -15,7 +21,7 @@ WSConnection::WSConnection (InfoSub::Source& source, bool isPublic,
|
||||
, m_remoteIP (remoteIP)
|
||||
, m_receiveQueueMutex (this, "WSConnection", __FILE__, __LINE__)
|
||||
, m_netOPs (getApp ().getOPs ())
|
||||
, m_loadSource (m_remoteIP)
|
||||
, m_loadSource (m_remoteIP, trimIP(m_remoteIP))
|
||||
, m_pingTimer (io_service)
|
||||
, m_sentPing (false)
|
||||
, m_receiveQueueRunning (false)
|
||||
|
||||
Reference in New Issue
Block a user