mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix CUser::IsUserAttached().
It honored only clients connected without any network. Thanks to Cronus` for reporting this.
This commit is contained in:
14
User.cpp
14
User.cpp
@@ -991,6 +991,20 @@ CString CUser::MakeCleanUserName(const CString& sUserName) {
|
||||
return sUserName.Token(0, false, "@").Replace_n(".", "");
|
||||
}
|
||||
|
||||
bool CUser::IsUserAttached() const {
|
||||
if (!m_vClients.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (vector<CIRCNetwork*>::const_iterator i = m_vIRCNetworks.begin(); i != m_vIRCNetworks.end(); ++i) {
|
||||
if ((*i)->IsUserAttached()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Setters
|
||||
void CUser::SetNick(const CString& s) { m_sNick = s; }
|
||||
void CUser::SetAltNick(const CString& s) { m_sAltNick = s; }
|
||||
|
||||
Reference in New Issue
Block a user