#include <User.h>
Collaboration diagram for CUser:Public Types | |
| enum | eHashType { HASH_NONE, HASH_MD5, HASH_SHA256, HASH_DEFAULT = HASH_SHA256 } |
Public Member Functions | |
| CUser (const CString &sUserName) | |
| ~CUser () | |
| CUser (const CUser &)=delete | |
| CUser & | operator= (const CUser &)=delete |
| bool | ParseConfig (CConfig *Config, CString &sError) |
| CConfig | ToConfig () const |
| bool | CheckPass (const CString &sPass) const |
| bool | AddAllowedHost (const CString &sHostMask) |
| bool | RemAllowedHost (const CString &sHostMask) |
| void | ClearAllowedHosts () |
| bool | IsHostAllowed (const CString &sHost) const |
| bool | IsValid (CString &sErrMsg, bool bSkipPass=false) const |
| CModules & | GetModules () |
| const CModules & | GetModules () const |
| CIRCNetwork * | AddNetwork (const CString &sNetwork, CString &sErrorRet) |
| bool | DeleteNetwork (const CString &sNetwork) |
| bool | AddNetwork (CIRCNetwork *pNetwork) |
| void | RemoveNetwork (CIRCNetwork *pNetwork) |
| CIRCNetwork * | FindNetwork (const CString &sNetwork) const |
| const std::vector< CIRCNetwork * > & | GetNetworks () const |
| bool | HasSpaceForNewNetwork () const |
| bool | PutUser (const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | PutAllUser (const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | PutStatus (const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | PutStatusNotice (const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | PutModule (const CString &sModule, const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | PutModNotice (const CString &sModule, const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr) |
| bool | IsUserAttached () const |
| void | UserConnected (CClient *pClient) |
| void | UserDisconnected (CClient *pClient) |
| CString | GetLocalDCCIP () const |
| CString | ExpandString (const CString &sStr) const |
| CString & | ExpandString (const CString &sStr, CString &sRet) const |
| CString | AddTimestamp (const CString &sStr) const |
| CString | AddTimestamp (time_t tm, const CString &sStr) const |
| void | CloneNetworks (const CUser &User) |
| bool | Clone (const CUser &User, CString &sErrorRet, bool bCloneNetworks=true) |
| void | BounceAllClients () |
| void | AddBytesRead (unsigned long long u) |
| void | AddBytesWritten (unsigned long long u) |
| void | SetNick (const CString &s) |
| void | SetAltNick (const CString &s) |
| void | SetIdent (const CString &s) |
| void | SetRealName (const CString &s) |
| void | SetBindHost (const CString &s) |
| void | SetDCCBindHost (const CString &s) |
| void | SetPass (const CString &s, eHashType eHash, const CString &sSalt="") |
| void | SetMultiClients (bool b) |
| void | SetDenyLoadMod (bool b) |
| void | SetAdmin (bool b) |
| void | SetDenySetBindHost (bool b) |
| bool | SetStatusPrefix (const CString &s) |
| void | SetDefaultChanModes (const CString &s) |
| void | SetClientEncoding (const CString &s) |
| void | SetQuitMsg (const CString &s) |
| bool | AddCTCPReply (const CString &sCTCP, const CString &sReply) |
| bool | DelCTCPReply (const CString &sCTCP) |
| bool | SetBufferCount (unsigned int u, bool bForce=false) |
| bool | SetChanBufferSize (unsigned int u, bool bForce=false) |
| bool | SetQueryBufferSize (unsigned int u, bool bForce=false) |
| void | SetAutoClearChanBuffer (bool b) |
| void | SetAutoClearQueryBuffer (bool b) |
| bool | SetLanguage (const CString &s) |
| void | SetBeingDeleted (bool b) |
| void | SetTimestampFormat (const CString &s) |
| void | SetTimestampAppend (bool b) |
| void | SetTimestampPrepend (bool b) |
| void | SetTimezone (const CString &s) |
| void | SetJoinTries (unsigned int i) |
| void | SetMaxJoins (unsigned int i) |
| void | SetSkinName (const CString &s) |
| void | SetMaxNetworks (unsigned int i) |
| void | SetMaxQueryBuffers (unsigned int i) |
| void | SetNoTrafficTimeout (unsigned int i) |
| const std::vector< CClient * > & | GetUserClients () const |
| std::vector< CClient * > | GetAllClients () const |
| const CString & | GetUserName () const |
| const CString & | GetCleanUserName () const |
| const CString & | GetNick (bool bAllowDefault=true) const |
| const CString & | GetAltNick (bool bAllowDefault=true) const |
| const CString & | GetIdent (bool bAllowDefault=true) const |
| CString | GetRealName () const |
| const CString & | GetBindHost () const |
| const CString & | GetDCCBindHost () const |
| const CString & | GetPass () const |
| eHashType | GetPassHashType () const |
| const CString & | GetPassSalt () const |
| const std::set< CString > & | GetAllowedHosts () const |
| const CString & | GetTimestampFormat () const |
| const CString & | GetClientEncoding () const |
| bool | GetTimestampAppend () const |
| bool | GetTimestampPrepend () const |
| const CString & | GetUserPath () const |
| bool | DenyLoadMod () const |
| bool | IsAdmin () const |
| bool | DenySetBindHost () const |
| bool | MultiClients () const |
| const CString & | GetStatusPrefix () const |
| const CString & | GetDefaultChanModes () const |
| unsigned int | GetPingFrequency () const |
| How long must an IRC connection be idle before ZNC sends a ping. More... | |
| unsigned int | GetPingSlack () const |
| Time between checks if PINGs need to be sent. More... | |
| unsigned int | GetNoTrafficTimeout () const |
| Timeout after which IRC connections are closed. More... | |
| CString | GetQuitMsg () const |
| const MCString & | GetCTCPReplies () const |
| unsigned int | GetBufferCount () const |
| unsigned int | GetChanBufferSize () const |
| unsigned int | GetQueryBufferSize () const |
| bool | AutoClearChanBuffer () const |
| bool | AutoClearQueryBuffer () const |
| bool | IsBeingDeleted () const |
| CString | GetTimezone () const |
| unsigned long long | BytesRead () const |
| unsigned long long | BytesWritten () const |
| unsigned int | JoinTries () const |
| unsigned int | MaxJoins () const |
| CString | GetSkinName () const |
| CString | GetLanguage () const |
| unsigned int | MaxNetworks () const |
| unsigned int | MaxQueryBuffers () const |
Static Public Member Functions | |
| static CString | SaltedHash (const CString &sPass, const CString &sSalt) |
| static bool | IsValidUserName (const CString &sUserName) |
| static CString | MakeCleanUserName (const CString &sUserName) |
| enum CUser::eHashType |
| CUser::CUser | ( | const CString & | sUserName | ) |
| CUser::~CUser | ( | ) |
|
delete |
| bool CUser::AddAllowedHost | ( | const CString & | sHostMask | ) |
Referenced by SaltedHash().
|
inline |
References m_uBytesRead.
|
inline |
References AddCTCPReply(), DelCTCPReply(), m_uBytesWritten, SetAdmin(), SetAltNick(), SetAutoClearChanBuffer(), SetAutoClearQueryBuffer(), SetBindHost(), SetBufferCount(), SetChanBufferSize(), SetClientEncoding(), SetDCCBindHost(), SetDefaultChanModes(), SetDenyLoadMod(), SetDenySetBindHost(), SetIdent(), SetLanguage(), SetMultiClients(), SetNick(), SetPass(), SetQueryBufferSize(), SetQuitMsg(), SetRealName(), and SetStatusPrefix().
Referenced by AddBytesWritten().
| CIRCNetwork* CUser::AddNetwork | ( | const CString & | sNetwork, |
| CString & | sErrorRet | ||
| ) |
Referenced by GetModules().
| bool CUser::AddNetwork | ( | CIRCNetwork * | pNetwork | ) |
Referenced by GetModules().
| bool CUser::AutoClearChanBuffer | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| bool CUser::AutoClearQueryBuffer | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| void CUser::BounceAllClients | ( | ) |
Referenced by GetModules().
| unsigned long long CUser::BytesRead | ( | ) | const |
Referenced by GetTimezone().
| unsigned long long CUser::BytesWritten | ( | ) | const |
Referenced by GetTimezone().
| bool CUser::CheckPass | ( | const CString & | sPass | ) | const |
Referenced by SaltedHash().
| void CUser::ClearAllowedHosts | ( | ) |
Referenced by SaltedHash().
Referenced by GetModules().
| void CUser::CloneNetworks | ( | const CUser & | User | ) |
Referenced by GetModules().
| bool CUser::DelCTCPReply | ( | const CString & | sCTCP | ) |
Referenced by AddBytesWritten().
| bool CUser::DeleteNetwork | ( | const CString & | sNetwork | ) |
Referenced by GetModules().
| bool CUser::DenyLoadMod | ( | ) | const |
Referenced by GetUserClients().
| bool CUser::DenySetBindHost | ( | ) | const |
Referenced by GetUserClients().
Referenced by GetModules().
| CIRCNetwork* CUser::FindNetwork | ( | const CString & | sNetwork | ) | const |
Referenced by GetModules().
| std::vector<CClient*> CUser::GetAllClients | ( | ) | const |
Referenced by GetUserClients().
| const std::set<CString>& CUser::GetAllowedHosts | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetAltNick | ( | bool | bAllowDefault = true | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetBindHost | ( | ) | const |
Referenced by GetUserClients().
| unsigned int CUser::GetBufferCount | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| unsigned int CUser::GetChanBufferSize | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| const CString& CUser::GetCleanUserName | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetClientEncoding | ( | ) | const |
Referenced by GetUserClients().
| const MCString& CUser::GetCTCPReplies | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| const CString& CUser::GetDCCBindHost | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetDefaultChanModes | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetIdent | ( | bool | bAllowDefault = true | ) | const |
Referenced by GetUserClients().
| CString CUser::GetLanguage | ( | ) | const |
Referenced by MaxJoins().
| CString CUser::GetLocalDCCIP | ( | ) | const |
Referenced by GetModules().
|
inline |
References m_pModules.
|
inline |
References AddNetwork(), AddTimestamp(), BounceAllClients(), Clone(), CloneNetworks(), DeleteNetwork(), ExpandString(), FindNetwork(), GetLocalDCCIP(), GetNetworks(), HasSpaceForNewNetwork(), IsUserAttached(), m_pModules, PutAllUser(), PutModNotice(), PutModule(), PutStatus(), PutStatusNotice(), PutUser(), RemoveNetwork(), UserConnected(), and UserDisconnected().
| const std::vector<CIRCNetwork*>& CUser::GetNetworks | ( | ) | const |
Referenced by GetModules().
| const CString& CUser::GetNick | ( | bool | bAllowDefault = true | ) | const |
Referenced by GetUserClients().
|
inline |
Timeout after which IRC connections are closed.
Must obviously be greater than GetPingFrequency() + GetPingSlack().
References AutoClearChanBuffer(), AutoClearQueryBuffer(), GetBufferCount(), GetChanBufferSize(), GetCTCPReplies(), GetQueryBufferSize(), GetQuitMsg(), and m_uNoTrafficTimeout.
| const CString& CUser::GetPass | ( | ) | const |
Referenced by GetUserClients().
| eHashType CUser::GetPassHashType | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetPassSalt | ( | ) | const |
Referenced by GetUserClients().
|
inline |
How long must an IRC connection be idle before ZNC sends a ping.
References m_uNoTrafficTimeout.
|
inline |
Time between checks if PINGs need to be sent.
References m_uNoTrafficTimeout.
| unsigned int CUser::GetQueryBufferSize | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| CString CUser::GetQuitMsg | ( | ) | const |
Referenced by GetNoTrafficTimeout().
| CString CUser::GetRealName | ( | ) | const |
Referenced by GetUserClients().
| CString CUser::GetSkinName | ( | ) | const |
Referenced by MaxJoins().
| const CString& CUser::GetStatusPrefix | ( | ) | const |
Referenced by GetUserClients().
| bool CUser::GetTimestampAppend | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetTimestampFormat | ( | ) | const |
Referenced by GetUserClients().
| bool CUser::GetTimestampPrepend | ( | ) | const |
Referenced by GetUserClients().
|
inline |
References BytesRead(), BytesWritten(), and m_sTimezone.
|
inline |
References DenyLoadMod(), DenySetBindHost(), GetAllClients(), GetAllowedHosts(), GetAltNick(), GetBindHost(), GetCleanUserName(), GetClientEncoding(), GetDCCBindHost(), GetDefaultChanModes(), GetIdent(), GetNick(), GetPass(), GetPassHashType(), GetPassSalt(), GetRealName(), GetStatusPrefix(), GetTimestampAppend(), GetTimestampFormat(), GetTimestampPrepend(), GetUserName(), GetUserPath(), IsAdmin(), m_vClients, and MultiClients().
| const CString& CUser::GetUserName | ( | ) | const |
Referenced by GetUserClients().
| const CString& CUser::GetUserPath | ( | ) | const |
Referenced by GetUserClients().
| bool CUser::HasSpaceForNewNetwork | ( | ) | const |
Referenced by GetModules().
| bool CUser::IsAdmin | ( | ) | const |
Referenced by GetUserClients().
|
inline |
References m_bBeingDeleted.
| bool CUser::IsHostAllowed | ( | const CString & | sHost | ) | const |
Referenced by SaltedHash().
| bool CUser::IsUserAttached | ( | ) | const |
Referenced by GetModules().
| bool CUser::IsValid | ( | CString & | sErrMsg, |
| bool | bSkipPass = false |
||
| ) | const |
Referenced by SaltedHash().
|
static |
Referenced by SaltedHash().
|
inline |
References m_uMaxJoinTries.
Referenced by SaltedHash().
|
inline |
References GetLanguage(), GetSkinName(), and m_uMaxJoins.
|
inline |
References m_uMaxNetworks.
|
inline |
References m_uMaxQueryBuffers.
| bool CUser::MultiClients | ( | ) | const |
Referenced by GetUserClients().
| bool CUser::PutAllUser | ( | const CString & | sLine, |
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::PutModNotice | ( | const CString & | sModule, |
| const CString & | sLine, | ||
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::PutModule | ( | const CString & | sModule, |
| const CString & | sLine, | ||
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::PutStatus | ( | const CString & | sLine, |
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::PutStatusNotice | ( | const CString & | sLine, |
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::PutUser | ( | const CString & | sLine, |
| CClient * | pClient = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
Referenced by GetModules().
| bool CUser::RemAllowedHost | ( | const CString & | sHostMask | ) |
Referenced by SaltedHash().
| void CUser::RemoveNetwork | ( | CIRCNetwork * | pNetwork | ) |
Referenced by GetModules().
| void CUser::SetAdmin | ( | bool | b | ) |
Referenced by AddBytesWritten().
| void CUser::SetAltNick | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| void CUser::SetAutoClearChanBuffer | ( | bool | b | ) |
Referenced by AddBytesWritten().
| void CUser::SetAutoClearQueryBuffer | ( | bool | b | ) |
Referenced by AddBytesWritten().
|
inline |
References m_bBeingDeleted.
| void CUser::SetBindHost | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| bool CUser::SetBufferCount | ( | unsigned int | u, |
| bool | bForce = false |
||
| ) |
Referenced by AddBytesWritten().
| bool CUser::SetChanBufferSize | ( | unsigned int | u, |
| bool | bForce = false |
||
| ) |
Referenced by AddBytesWritten().
| void CUser::SetClientEncoding | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| void CUser::SetDCCBindHost | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| void CUser::SetDefaultChanModes | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| void CUser::SetDenyLoadMod | ( | bool | b | ) |
Referenced by AddBytesWritten().
| void CUser::SetDenySetBindHost | ( | bool | b | ) |
Referenced by AddBytesWritten().
| void CUser::SetIdent | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
|
inline |
References m_uMaxJoinTries.
| bool CUser::SetLanguage | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
|
inline |
References m_uMaxJoins.
|
inline |
References m_uMaxNetworks.
|
inline |
References m_uMaxQueryBuffers.
| void CUser::SetMultiClients | ( | bool | b | ) |
Referenced by AddBytesWritten().
| void CUser::SetNick | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
|
inline |
References m_uNoTrafficTimeout.
Referenced by AddBytesWritten().
| bool CUser::SetQueryBufferSize | ( | unsigned int | u, |
| bool | bForce = false |
||
| ) |
Referenced by AddBytesWritten().
| void CUser::SetQuitMsg | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
| void CUser::SetRealName | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
|
inline |
References m_sSkinName.
| bool CUser::SetStatusPrefix | ( | const CString & | s | ) |
Referenced by AddBytesWritten().
|
inline |
References m_bAppendTimestamp.
|
inline |
References m_sTimestampFormat.
|
inline |
References m_bPrependTimestamp.
|
inline |
References m_sTimezone.
| CConfig CUser::ToConfig | ( | ) | const |
Referenced by SaltedHash().
| void CUser::UserConnected | ( | CClient * | pClient | ) |
Referenced by GetModules().
| void CUser::UserDisconnected | ( | CClient * | pClient | ) |
Referenced by GetModules().
|
protected |
|
protected |
Referenced by SetTimestampAppend().
|
protected |
|
protected |
|
protected |
Referenced by IsBeingDeleted(), and SetBeingDeleted().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by SetTimestampPrepend().
|
protected |
|
protected |
|
protected |
Referenced by GetModules().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by SetSkinName().
|
protected |
|
protected |
Referenced by SetTimestampFormat().
|
protected |
Referenced by GetTimezone(), and SetTimezone().
|
protected |
|
protected |
|
protected |
Referenced by AddBytesRead().
|
protected |
Referenced by AddBytesWritten().
|
protected |
|
protected |
Referenced by MaxJoins(), and SetMaxJoins().
|
protected |
Referenced by JoinTries(), and SetJoinTries().
|
protected |
Referenced by MaxNetworks(), and SetMaxNetworks().
|
protected |
Referenced by MaxQueryBuffers(), and SetMaxQueryBuffers().
|
protected |
Referenced by GetNoTrafficTimeout(), GetPingFrequency(), GetPingSlack(), and SetNoTrafficTimeout().
|
protected |
|
protected |
Referenced by GetUserClients().
|
protected |
1.8.11