mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Style fix: use const Csock* in for-each loop
This commit is contained in:
@@ -76,11 +76,9 @@ CZNCSock::CZNCSock(const CString& sHost, u_short port, int timeout)
|
||||
}
|
||||
|
||||
unsigned int CSockManager::GetAnonConnectionCount(const CString& sIP) const {
|
||||
const_iterator it;
|
||||
unsigned int ret = 0;
|
||||
|
||||
for (it = begin(); it != end(); ++it) {
|
||||
Csock* pSock = *it;
|
||||
for (const Csock* pSock : *this) {
|
||||
// Logged in CClients have "USR::<username>" as their sockname
|
||||
if (pSock->GetType() == Csock::INBOUND && pSock->GetRemoteIP() == sIP &&
|
||||
!pSock->GetSockName().StartsWith("USR::")) {
|
||||
|
||||
Reference in New Issue
Block a user