mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Allow a client to become "away"
The result of CIRCNetwork::IsUserOnline() will only show clients which do not have the away state set. This value is not set from the IRC command AWAY, but a future module could use this behaviour. Some CIRCNetwork::IsUserAttached() checks are now moved into of CIRCNetwork::IsUserOnline() checks. This allows "away" clients to store buffer even if KeepBuffer is false.
This commit is contained in:
@@ -325,6 +325,18 @@ void CIRCNetwork::BounceAllClients() {
|
||||
m_vClients.clear();
|
||||
}
|
||||
|
||||
bool CIRCNetwork::IsUserOnline() const {
|
||||
vector<CClient*>::const_iterator it;
|
||||
for (it = m_vClients.begin(); it != m_vClients.end(); ++it) {
|
||||
CClient *pClient = *it;
|
||||
if (!pClient->IsAway()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CIRCNetwork::ClientConnected(CClient *pClient) {
|
||||
if (!m_pUser->MultiClients()) {
|
||||
BounceAllClients();
|
||||
|
||||
Reference in New Issue
Block a user