mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Prefer StartsWith(s) over Left(n) == s
This commit is contained in:
@@ -69,7 +69,7 @@ unsigned int CSockManager::GetAnonConnectionCount(const CString &sIP) const {
|
||||
Csock *pSock = *it;
|
||||
// Logged in CClients have "USR::<username>" as their sockname
|
||||
if (pSock->GetType() == Csock::INBOUND && pSock->GetRemoteIP() == sIP
|
||||
&& pSock->GetSockName().Left(5) != "USR::") {
|
||||
&& !pSock->GetSockName().StartsWith("USR::")) {
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user