mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Implement chghost capability
Interaction with extended-join doesn't yet work correctly, because ZNC doesn't keep track of everyone's real names
This commit is contained in:
@@ -119,6 +119,7 @@ class CClient : public CIRCSocket {
|
||||
bool HasExtendedJoin() const { return m_bExtendedJoin; }
|
||||
bool HasNamesx() const { return m_bNamesx; }
|
||||
bool HasUHNames() const { return m_bUHNames; }
|
||||
bool HasChgHost() const { return m_bChgHost; }
|
||||
bool IsAway() const { return m_bAway; }
|
||||
bool HasServerTime() const { return m_bServerTime; }
|
||||
bool HasBatch() const { return m_bBatch; }
|
||||
@@ -289,6 +290,7 @@ class CClient : public CIRCSocket {
|
||||
bool m_bExtendedJoin;
|
||||
bool m_bNamesx;
|
||||
bool m_bUHNames;
|
||||
bool m_bChgHost;
|
||||
bool m_bAway;
|
||||
bool m_bServerTime;
|
||||
bool m_bBatch;
|
||||
|
||||
@@ -131,6 +131,7 @@ class CIRCSock : public CIRCSocket {
|
||||
unsigned int GetMaxNickLen() const { return m_uMaxNickLen; }
|
||||
EChanModeArgs GetModeType(char cMode) const;
|
||||
char GetPermFromMode(char cMode) const;
|
||||
char GetModeFromPerm(char cPerm) const;
|
||||
const std::map<char, EChanModeArgs>& GetChanModes() const {
|
||||
return m_mceChanModes;
|
||||
}
|
||||
@@ -177,6 +178,7 @@ class CIRCSock : public CIRCSocket {
|
||||
bool OnActionMessage(CActionMessage& Message);
|
||||
bool OnAwayMessage(CMessage& Message);
|
||||
bool OnCapabilityMessage(CMessage& Message);
|
||||
bool OnChgHostMessage(CChgHostMessage& Message);
|
||||
bool OnCTCPMessage(CCTCPMessage& Message);
|
||||
bool OnErrorMessage(CMessage& Message);
|
||||
bool OnInviteMessage(CMessage& Message);
|
||||
|
||||
@@ -67,6 +67,7 @@ class CMessage {
|
||||
Action,
|
||||
Away,
|
||||
Capability,
|
||||
ChgHost,
|
||||
CTCP,
|
||||
Error,
|
||||
Invite,
|
||||
@@ -121,6 +122,7 @@ class CMessage {
|
||||
*/
|
||||
VCString GetParamsSplit(unsigned int uIdx, unsigned int uLen = -1) const;
|
||||
void SetParams(const VCString& vsParams);
|
||||
void SetParams(VCString&& vsParams);
|
||||
|
||||
/// @deprecated use GetParamsColon() instead.
|
||||
CString GetParams(unsigned int uIdx, unsigned int uLen = -1) const
|
||||
@@ -333,4 +335,13 @@ class CTopicMessage : public CTargetMessage {
|
||||
};
|
||||
REGISTER_ZNC_MESSAGE(CTopicMessage);
|
||||
|
||||
class CChgHostMessage : public CMessage {
|
||||
public:
|
||||
CString GetNewIdent() const { return GetParam(0); }
|
||||
void SetNewIdent(const CString& sIdent) { SetParam(0, sIdent); }
|
||||
CString GetNewHost() const { return GetParam(1); }
|
||||
void SetNewHost(const CString& sHost) { SetParam(1, sHost); }
|
||||
};
|
||||
REGISTER_ZNC_MESSAGE(CChgHostMessage);
|
||||
|
||||
#endif // !ZNC_MESSAGE_H
|
||||
|
||||
Reference in New Issue
Block a user