mirror of
https://github.com/znc/znc.git
synced 2026-08-08 18:03:22 +02:00
Add support for cap account-tag
The account-tag capability is now requested when ZNC connects to an IRC server, the same is then offered to clients connecting. This permits the tag to then pass through to account-tag aware clients.
This commit is contained in:
@@ -107,6 +107,7 @@ class CClient : public CIRCSocket {
|
||||
m_bCapNotify(false),
|
||||
m_bAwayNotify(false),
|
||||
m_bAccountNotify(false),
|
||||
m_bAccountTag(false),
|
||||
m_bExtendedJoin(false),
|
||||
m_bNamesx(false),
|
||||
m_bUHNames(false),
|
||||
@@ -148,6 +149,11 @@ class CClient : public CIRCSocket {
|
||||
{true, [this](bool bVal) { m_bAwayNotify = bVal; }}},
|
||||
{"account-notify",
|
||||
{true, [this](bool bVal) { m_bAccountNotify = bVal; }}},
|
||||
{"account-tag",
|
||||
{true, [this](bool bVal) {
|
||||
m_bAccountTag = bVal;
|
||||
SetTagSupport("account", bVal);
|
||||
}}},
|
||||
{"extended-join",
|
||||
{true, [this](bool bVal) { m_bExtendedJoin = bVal; }}},
|
||||
}) {
|
||||
@@ -178,6 +184,7 @@ class CClient : public CIRCSocket {
|
||||
bool HasCapNotify() const { return m_bCapNotify; }
|
||||
bool HasAwayNotify() const { return m_bAwayNotify; }
|
||||
bool HasAccountNotify() const { return m_bAccountNotify; }
|
||||
bool HasAccountTag() const { return m_bAccountTag; }
|
||||
bool HasExtendedJoin() const { return m_bExtendedJoin; }
|
||||
bool HasNamesx() const { return m_bNamesx; }
|
||||
bool HasUHNames() const { return m_bUHNames; }
|
||||
@@ -346,6 +353,7 @@ class CClient : public CIRCSocket {
|
||||
bool m_bCapNotify;
|
||||
bool m_bAwayNotify;
|
||||
bool m_bAccountNotify;
|
||||
bool m_bAccountTag;
|
||||
bool m_bExtendedJoin;
|
||||
bool m_bNamesx;
|
||||
bool m_bUHNames;
|
||||
|
||||
@@ -150,6 +150,7 @@ class CIRCSock : public CIRCSocket {
|
||||
bool HasUHNames() const { return m_bUHNames; }
|
||||
bool HasAwayNotify() const { return m_bAwayNotify; }
|
||||
bool HasAccountNotify() const { return m_bAccountNotify; }
|
||||
bool HasAccountTag() const { return m_bAccountTag; }
|
||||
bool HasExtendedJoin() const { return m_bExtendedJoin; }
|
||||
bool HasServerTime() const { return m_bServerTime; }
|
||||
const std::set<char>& GetUserModes() const {
|
||||
@@ -207,6 +208,7 @@ class CIRCSock : public CIRCSocket {
|
||||
bool m_bUHNames;
|
||||
bool m_bAwayNotify;
|
||||
bool m_bAccountNotify;
|
||||
bool m_bAccountTag;
|
||||
bool m_bExtendedJoin;
|
||||
bool m_bServerTime;
|
||||
CString m_sPerms;
|
||||
|
||||
@@ -67,6 +67,7 @@ CIRCSock::CIRCSock(CIRCNetwork* pNetwork)
|
||||
m_bUHNames(false),
|
||||
m_bAwayNotify(false),
|
||||
m_bAccountNotify(false),
|
||||
m_bAccountTag(false),
|
||||
m_bExtendedJoin(false),
|
||||
m_bServerTime(false),
|
||||
m_sPerms("*!@%+"),
|
||||
@@ -376,6 +377,7 @@ bool CIRCSock::OnCapabilityMessage(CMessage& Message) {
|
||||
{"userhost-in-names", [this](bool bVal) { m_bUHNames = bVal; }},
|
||||
{"away-notify", [this](bool bVal) { m_bAwayNotify = bVal; }},
|
||||
{"account-notify", [this](bool bVal) { m_bAccountNotify = bVal; }},
|
||||
{"account-tag", [this](bool bVal) { m_bAccountTag = bVal; }},
|
||||
{"extended-join", [this](bool bVal) { m_bExtendedJoin = bVal; }},
|
||||
{"server-time", [this](bool bVal) { m_bServerTime = bVal; }},
|
||||
{"znc.in/server-time-iso",
|
||||
|
||||
Reference in New Issue
Block a user