worked on Image
This commit is contained in:
@@ -98,23 +98,24 @@ void IrcMessageHandler::handleRoomStateMessage(Communi::IrcMessage *message)
|
||||
|
||||
// Room modes
|
||||
{
|
||||
auto roomModes = twitchChannel->accessRoomModes();
|
||||
auto roomModes = *twitchChannel->accessRoomModes();
|
||||
|
||||
if ((it = tags.find("emote-only")) != tags.end()) {
|
||||
roomModes->emoteOnly = it.value() == "1";
|
||||
roomModes.emoteOnly = it.value() == "1";
|
||||
}
|
||||
if ((it = tags.find("subs-only")) != tags.end()) {
|
||||
roomModes->submode = it.value() == "1";
|
||||
roomModes.submode = it.value() == "1";
|
||||
}
|
||||
if ((it = tags.find("slow")) != tags.end()) {
|
||||
roomModes->slowMode = it.value().toInt();
|
||||
roomModes.slowMode = it.value().toInt();
|
||||
}
|
||||
if ((it = tags.find("r9k")) != tags.end()) {
|
||||
roomModes->r9k = it.value() == "1";
|
||||
roomModes.r9k = it.value() == "1";
|
||||
}
|
||||
if ((it = tags.find("broadcaster-lang")) != tags.end()) {
|
||||
roomModes->broadcasterLang = it.value().toString();
|
||||
roomModes.broadcasterLang = it.value().toString();
|
||||
}
|
||||
twitchChannel->setRoomModes(roomModes);
|
||||
}
|
||||
|
||||
twitchChannel->roomModesChanged.invoke();
|
||||
|
||||
@@ -230,9 +230,9 @@ void TwitchChannel::setRoomId(const QString &id)
|
||||
this->loadRecentMessages();
|
||||
}
|
||||
|
||||
const AccessGuard<TwitchChannel::RoomModes> TwitchChannel::accessRoomModes() const
|
||||
AccessGuard<const TwitchChannel::RoomModes> TwitchChannel::accessRoomModes() const
|
||||
{
|
||||
return this->roomModes_.access();
|
||||
return this->roomModes_.accessConst();
|
||||
}
|
||||
|
||||
void TwitchChannel::setRoomModes(const RoomModes &_roomModes)
|
||||
@@ -247,9 +247,9 @@ bool TwitchChannel::isLive() const
|
||||
return this->streamStatus_.access()->live;
|
||||
}
|
||||
|
||||
const AccessGuard<TwitchChannel::StreamStatus> TwitchChannel::accessStreamStatus() const
|
||||
AccessGuard<const TwitchChannel::StreamStatus> TwitchChannel::accessStreamStatus() const
|
||||
{
|
||||
return this->streamStatus_.access();
|
||||
return this->streamStatus_.accessConst();
|
||||
}
|
||||
|
||||
boost::optional<EmotePtr> TwitchChannel::getBttvEmote(const EmoteName &name) const
|
||||
|
||||
@@ -66,9 +66,9 @@ public:
|
||||
|
||||
QString getRoomId() const;
|
||||
void setRoomId(const QString &id);
|
||||
const AccessGuard<RoomModes> accessRoomModes() const;
|
||||
AccessGuard<const RoomModes> accessRoomModes() const;
|
||||
void setRoomModes(const RoomModes &roomModes_);
|
||||
const AccessGuard<StreamStatus> accessStreamStatus() const;
|
||||
AccessGuard<const StreamStatus> accessStreamStatus() const;
|
||||
|
||||
boost::optional<EmotePtr> getBttvEmote(const EmoteName &name) const;
|
||||
boost::optional<EmotePtr> getFfzEmote(const EmoteName &name) const;
|
||||
|
||||
Reference in New Issue
Block a user