chore: refactor TwitchIrcServer (#5421)
This commit is contained in:
@@ -390,9 +390,9 @@ QString popup(const CommandContext &ctx)
|
||||
}
|
||||
|
||||
// Open channel passed as argument in a popup
|
||||
auto *app = getApp();
|
||||
auto targetChannel = app->twitch->getOrAddChannel(target);
|
||||
app->getWindows()->openInPopup(targetChannel);
|
||||
auto targetChannel =
|
||||
getIApp()->getTwitchAbstract()->getOrAddChannel(target);
|
||||
getIApp()->getWindows()->openInPopup(targetChannel);
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -533,7 +533,8 @@ QString sendRawMessage(const CommandContext &ctx)
|
||||
|
||||
if (ctx.channel->isTwitchChannel())
|
||||
{
|
||||
getApp()->twitch->sendRawMessage(ctx.words.mid(1).join(" "));
|
||||
getIApp()->getTwitchAbstract()->sendRawMessage(
|
||||
ctx.words.mid(1).join(" "));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -566,7 +567,7 @@ QString injectFakeMessage(const CommandContext &ctx)
|
||||
}
|
||||
|
||||
auto ircText = ctx.words.mid(1).join(" ");
|
||||
getApp()->twitch->addFakeMessage(ircText);
|
||||
getIApp()->getTwitchAbstract()->addFakeMessage(ircText);
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -667,7 +668,7 @@ QString openUsercard(const CommandContext &ctx)
|
||||
stripChannelName(channelName);
|
||||
|
||||
ChannelPtr channelTemp =
|
||||
getApp()->twitch->getChannelOrEmpty(channelName);
|
||||
getIApp()->getTwitchAbstract()->getChannelOrEmpty(channelName);
|
||||
|
||||
if (channelTemp->isEmpty())
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ QString formatWhisperError(HelixWhisperError error, const QString &message)
|
||||
|
||||
bool appendWhisperMessageWordsLocally(const QStringList &words)
|
||||
{
|
||||
auto *app = getApp();
|
||||
auto *app = getIApp();
|
||||
|
||||
MessageBuilder b;
|
||||
|
||||
@@ -177,7 +177,7 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
|
||||
b->flags.set(MessageFlag::Whisper);
|
||||
auto messagexD = b.release();
|
||||
|
||||
app->twitch->whispersChannel->addMessage(messagexD);
|
||||
getIApp()->getTwitch()->getWhispersChannel()->addMessage(messagexD);
|
||||
|
||||
auto overrideFlags = std::optional<MessageFlags>(messagexD->flags);
|
||||
overrideFlags->set(MessageFlag::DoNotLog);
|
||||
@@ -186,7 +186,7 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
|
||||
!(getSettings()->streamerModeSuppressInlineWhispers &&
|
||||
getIApp()->getStreamerMode()->isEnabled()))
|
||||
{
|
||||
app->twitch->forEachChannel(
|
||||
app->getTwitchAbstract()->forEachChannel(
|
||||
[&messagexD, overrideFlags](ChannelPtr _channel) {
|
||||
_channel->addMessage(messagexD, overrideFlags);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user