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:
Alexey Sokolov
2024-10-15 11:29:36 +01:00
parent 25b19bb889
commit d49399bbca
7 changed files with 161 additions and 3 deletions

View File

@@ -81,6 +81,16 @@ void CMessage::SetParams(const VCString& vsParams) {
}
}
void CMessage::SetParams(VCString&& vsParams) {
m_vsParams = std::move(vsParams);
m_bColon = false;
if (m_eType == Type::Text || m_eType == Type::Notice ||
m_eType == Type::Action || m_eType == Type::CTCP) {
InitType();
}
}
CString CMessage::GetParam(unsigned int uIdx) const {
if (uIdx >= m_vsParams.size()) {
return "";
@@ -270,6 +280,7 @@ void CMessage::InitType() {
{"ACCOUNT", Type::Account},
{"AWAY", Type::Away},
{"CAP", Type::Capability},
{"CHGHOST", Type::ChgHost},
{"ERROR", Type::Error},
{"INVITE", Type::Invite},
{"JOIN", Type::Join},