From 00d4fbf9eddb4a613893fc4c3cd0f37dc38ff1ec Mon Sep 17 00:00:00 2001 From: Ruben Anders Date: Thu, 11 Apr 2019 12:00:57 +0200 Subject: [PATCH] Add {channel} replacement --- src/widgets/helper/ChannelView.cpp | 2 +- src/widgets/settingspages/ModerationPage.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index 682a976d7..9578c352a 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1667,7 +1667,7 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const Link &link, case Link::UserAction: { QString value = link.value; - value.replace("{user}", layout->getMessage()->loginName); + value.replace("{user}", layout->getMessage()->loginName).replace("{channel}", this->channel_->getName()); this->channel_->sendMessage(value); } break; diff --git a/src/widgets/settingspages/ModerationPage.cpp b/src/widgets/settingspages/ModerationPage.cpp index 422da3c05..3349d2e93 100644 --- a/src/widgets/settingspages/ModerationPage.cpp +++ b/src/widgets/settingspages/ModerationPage.cpp @@ -161,7 +161,7 @@ ModerationPage::ModerationPage() // clang-format off auto label = modMode.emplace( "Moderation mode is enabled by clicking in a channel that you moderate.

" - "Moderation buttons can be bound to chat commands such as \"/ban {user}\", \"/timeout {user} 1000\" or any other custom text commands.
"); + "Moderation buttons can be bound to chat commands such as \"/ban {user}\", \"/timeout {user} 1000\", \"/w someusername !report {user} was bad in channel {channel}\" or any other custom text commands.
"); label->setWordWrap(true); label->setStyleSheet("color: #bbb"); // clang-format on