/live split for channels going live (#1998)

Co-authored-by: 23rd <23rd@vivaldi.net>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
apa420
2021-05-09 16:17:04 +02:00
committed by GitHub
parent d96f4575ba
commit dcd65b5978
14 changed files with 104 additions and 12 deletions
+7
View File
@@ -28,6 +28,7 @@ TwitchIrcServer::TwitchIrcServer()
: whispersChannel(new Channel("/whispers", Channel::Type::TwitchWhispers))
, mentionsChannel(new Channel("/mentions", Channel::Type::TwitchMentions))
, watchingChannel(Channel::getEmpty(), Channel::Type::TwitchWatching)
, liveChannel(new Channel("/live", Channel::Type::TwitchLive))
{
this->initializeIrc();
@@ -257,6 +258,11 @@ std::shared_ptr<Channel> TwitchIrcServer::getCustomChannel(
return this->mentionsChannel;
}
if (channelName == "/live")
{
return this->liveChannel;
}
if (channelName == "$$$")
{
static auto channel =
@@ -289,6 +295,7 @@ void TwitchIrcServer::forEachChannelAndSpecialChannels(
func(this->whispersChannel);
func(this->mentionsChannel);
func(this->liveChannel);
}
std::shared_ptr<Channel> TwitchIrcServer::getChannelOrEmptyByID(