fix for bur0k
This commit is contained in:
@@ -83,6 +83,22 @@ void TwitchChannel::sendMessage(const QString &message)
|
||||
singletons::IrcManager::getInstance().sendMessage(this->name, parsedMessage);
|
||||
}
|
||||
|
||||
bool TwitchChannel::isMod()
|
||||
{
|
||||
return this->mod;
|
||||
}
|
||||
|
||||
bool TwitchChannel::isBroadcaster()
|
||||
{
|
||||
return this->name == singletons::AccountManager::getInstance().Twitch.getCurrent()->getUserId();
|
||||
}
|
||||
|
||||
bool TwitchChannel::hasModRights()
|
||||
{
|
||||
// fourtf: check if staff
|
||||
return this->isMod() || this->isBroadcaster();
|
||||
}
|
||||
|
||||
void TwitchChannel::setLive(bool newLiveStatus)
|
||||
{
|
||||
if (this->isLive == newLiveStatus) {
|
||||
|
||||
@@ -22,6 +22,10 @@ public:
|
||||
bool canSendMessage() const override;
|
||||
void sendMessage(const QString &message) override;
|
||||
|
||||
bool isMod();
|
||||
bool isBroadcaster();
|
||||
bool hasModRights();
|
||||
|
||||
const std::shared_ptr<chatterino::util::EmoteMap> bttvChannelEmotes;
|
||||
const std::shared_ptr<chatterino::util::EmoteMap> ffzChannelEmotes;
|
||||
|
||||
@@ -34,6 +38,7 @@ public:
|
||||
boost::signals2::signal<void()> onlineStatusChanged;
|
||||
|
||||
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
||||
pajlada::Signals::NoArgSignal userStateChanged;
|
||||
|
||||
QString roomID;
|
||||
bool isLive;
|
||||
@@ -47,6 +52,8 @@ private:
|
||||
void refreshLiveStatus();
|
||||
|
||||
void fetchRecentMessages();
|
||||
|
||||
bool mod;
|
||||
};
|
||||
|
||||
} // namespace twitch
|
||||
|
||||
Reference in New Issue
Block a user