From: Svetlana Tkachenko Date: Mon, 8 Jan 2018 04:44:17 +0000 (+0000) Subject: Support $i:account in aliases X-Git-Tag: travis-deploy-test~148 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=a83608156c3a561a0ba6d9625303040c02329550 Support $i:account in aliases Closes GH-321. --- diff --git a/src/common/aliasmanager.cpp b/src/common/aliasmanager.cpp index e7cdec65..105a5954 100644 --- a/src/common/aliasmanager.cpp +++ b/src/common/aliasmanager.cpp @@ -190,6 +190,7 @@ void AliasManager::expand(const QString &alias, const BufferInfo &bufferInfo, co IrcUser *ircUser = net->ircUser(params[j - 1]); command = command.replace(QString("$%1:hostname").arg(j), ircUser ? ircUser->host() : QString("*")); command = command.replace(QString("$%1:ident").arg(j), ircUser ? ircUser->user() : QString("*")); + command = command.replace(QString("$%1:account").arg(j), ircUser ? ircUser->account() : QString("*")); command = command.replace(QString("$%1").arg(j), params[j - 1]); } command = command.replace("$0", msg); diff --git a/src/qtui/settingspages/aliasesmodel.cpp b/src/qtui/settingspages/aliasesmodel.cpp index 99b03d26..3fab3834 100644 --- a/src/qtui/settingspages/aliasesmodel.cpp +++ b/src/qtui/settingspages/aliasesmodel.cpp @@ -65,6 +65,7 @@ QVariant AliasesModel::data(const QModelIndex &index, int role) const " - $i.. represents all parameters from i on separated by spaces.
" " - $i:hostname represents the hostname of the user identified by the i'th parameter or a * if unknown.
" " - $i:ident represents the ident of the user identified by the i'th parameter or a * if unknown.
" + " - $i:account represents the account of the user identified by the i'th parameter or a * if logged out or unknown.
" " - $0 the whole string.
" " - $nick your current nickname
" " - $channel the name of the selected channel

"