Make isMod a virtual method so it can be called from the base class too

This commit is contained in:
Rasmus Karlsson 2018-01-18 18:17:48 +01:00
parent 283b48f845
commit 1e7d3a2ec6
3 changed files with 6 additions and 2 deletions

View file

@ -53,6 +53,10 @@ public:
virtual bool canSendMessage() const;
virtual void sendMessage(const QString &message);
virtual bool isMod() const
{
return false;
}
private:
messages::LimitedQueue<messages::MessagePtr> messages;

View file

@ -90,7 +90,7 @@ void TwitchChannel::sendMessage(const QString &message)
singletons::IrcManager::getInstance().sendMessage(this->name, parsedMessage);
}
bool TwitchChannel::isMod()
bool TwitchChannel::isMod() const
{
return this->mod;
}

View file

@ -22,7 +22,7 @@ public:
bool canSendMessage() const override;
void sendMessage(const QString &message) override;
bool isMod();
bool isMod() const override;
void setMod(bool value);
bool isBroadcaster();
bool hasModRights();