Skip to content
Permalink
Browse files

Support $i:account in aliases

Closes GH-321.
  • Loading branch information
Svetlana-T authored and Sput42 committed Jan 8, 2018
1 parent 517fc0f commit a83608156c3a561a0ba6d9625303040c02329550
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/common/aliasmanager.cpp
  2. +1 −0 src/qtui/settingspages/aliasesmodel.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);
@@ -65,6 +65,7 @@ QVariant AliasesModel::data(const QModelIndex &index, int role) const
" - <b>$i..</b> represents all parameters from i on separated by spaces.<br />"
" - <b>$i:hostname</b> represents the hostname of the user identified by the i'th parameter or a * if unknown.<br />"
" - <b>$i:ident</b> represents the ident of the user identified by the i'th parameter or a * if unknown.<br />"
" - <b>$i:account</b> represents the account of the user identified by the i'th parameter or a * if logged out or unknown.<br />"
" - <b>$0</b> the whole string.<br />"
" - <b>$nick</b> your current nickname<br />"
" - <b>$channel</b> the name of the selected channel<br /><br />"

0 comments on commit a836081

Please sign in to comment.
You can’t perform that action at this time.