Fix mod, unmod, vip, unvip buttons in User Card (#4387)

This commit is contained in:
pajlada
2023-02-16 21:43:37 +01:00
committed by GitHub
parent 28bdf440fd
commit 6380fb5198
2 changed files with 17 additions and 4 deletions
+16 -4
View File
@@ -419,16 +419,28 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
});
QObject::connect(mod.getElement(), &Button::leftClicked, [this] {
this->underlyingChannel_->sendMessage("/mod " + this->userName_);
QString value = "/mod " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
});
QObject::connect(unmod.getElement(), &Button::leftClicked, [this] {
this->underlyingChannel_->sendMessage("/unmod " + this->userName_);
QString value = "/unmod " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
});
QObject::connect(vip.getElement(), &Button::leftClicked, [this] {
this->underlyingChannel_->sendMessage("/vip " + this->userName_);
QString value = "/vip " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
});
QObject::connect(unvip.getElement(), &Button::leftClicked, [this] {
this->underlyingChannel_->sendMessage("/unvip " + this->userName_);
QString value = "/unvip " + this->userName_;
value = getApp()->commands->execCommand(
value, this->underlyingChannel_, false);
this->underlyingChannel_->sendMessage(value);
});
// userstate