Refactored TwitchChannel

This commit is contained in:
fourtf
2018-07-15 20:28:54 +02:00
parent 111853c574
commit 1614b11e42
11 changed files with 268 additions and 247 deletions
@@ -142,7 +142,7 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
app->twitch.server->getWriteConnection()->sendRaw("PRIVMSG #jtv :" + text + "\r\n");
if (app->settings->inlineWhispers) {
if (getSettings()->inlineWhispers) {
app->twitch.server->forEachChannel(
[&b](ChannelPtr _channel) { _channel->addMessage(b.getMessage()); });
}
@@ -163,10 +163,10 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
return "";
} else if (commandName == "/uptime") {
const auto &streamStatus = twitchChannel->getStreamStatus();
const auto &streamStatus = twitchChannel->accessStreamStatus();
QString messageText =
streamStatus.live ? streamStatus.uptime : "Channel is not live.";
streamStatus->live ? streamStatus->uptime : "Channel is not live.";
channel->addMessage(Message::createSystemMessage(messageText));