Commit 1a115f22 authored by Peter Simonsson's avatar Peter Simonsson
Browse files

Add support for chghost capability

Allows the server to update the hostmask for an user.
parent 94c16d7c
......@@ -723,6 +723,17 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
nickInfo->setAccount(account);
}
}
else if (command == QLatin1String("chghost") && plHas(2))
{
NickInfoPtr nickInfo = m_server->getNickInfo(sourceNick);
if (nickInfo)
{
const QString user = parameterList.value(0);
const QString host = parameterList.value(1);
nickInfo->setHostmask(QStringLiteral("%1@%2").arg(user, host));
}
}
else
{
qCDebug(KONVERSATION_LOG) << "unknown client command" << parameterList.count() << _plHad << _plWanted << command << parameterList.join(QLatin1Char(' '));
......
......@@ -4450,6 +4450,7 @@ void Server::initCapablityNames()
{ QStringLiteral("multi-prefix"), MultiPrefix },
{ QStringLiteral("account-notify"), AccountNotify },
{ QStringLiteral("znc.in/self-message"), SelfMessage },
{ QStringLiteral("chghost"), ChgHost },
};
}
......
......@@ -101,6 +101,7 @@ class Server : public QObject
MultiPrefix = 0x40,
AccountNotify = 0x80,
SelfMessage = 0x100,
ChgHost = 0x200,
};
Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment