mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02: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:
@@ -84,6 +84,7 @@ public:
|
||||
m_bInCap = false;
|
||||
m_bNamesx = false;
|
||||
m_bUHNames = false;
|
||||
m_bAway = false;
|
||||
EnableReadLine();
|
||||
// RFC says a line can have 512 chars max, but we are
|
||||
// a little more gentle ;)
|
||||
@@ -101,6 +102,7 @@ public:
|
||||
CString GetNickMask() const;
|
||||
bool HasNamesx() const { return m_bNamesx; }
|
||||
bool HasUHNames() const { return m_bUHNames; }
|
||||
bool IsAway() const { return m_bAway; }
|
||||
|
||||
void UserCommand(CString& sLine);
|
||||
void UserPortCommand(CString& sLine);
|
||||
@@ -129,6 +131,7 @@ public:
|
||||
virtual void ReachedMaxBuffer();
|
||||
|
||||
void SetNick(const CString& s);
|
||||
void SetAway(bool bAway) { m_bAway = bAway; }
|
||||
CUser* GetUser() const { return m_pUser; }
|
||||
void SetNetwork(CIRCNetwork* pNetwork, bool bDisconnect=true, bool bReconnect=true);
|
||||
CIRCNetwork* GetNetwork() const { return m_pNetwork; }
|
||||
@@ -147,6 +150,7 @@ protected:
|
||||
bool m_bInCap;
|
||||
bool m_bNamesx;
|
||||
bool m_bUHNames;
|
||||
bool m_bAway;
|
||||
CUser* m_pUser;
|
||||
CIRCNetwork* m_pNetwork;
|
||||
CString m_sNick;
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
void BounceAllClients();
|
||||
|
||||
bool IsUserAttached() const { return !m_vClients.empty(); }
|
||||
bool IsUserOnline() const;
|
||||
void ClientConnected(CClient *pClient);
|
||||
void ClientDisconnected(CClient *pClient);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user