feat: Live Emote Updates for 7TV (#4090)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2022-11-13 12:07:41 +01:00
committed by GitHub
parent 8fa89b4073
commit 39f7d8ac4c
35 changed files with 1833 additions and 54 deletions
+17
View File
@@ -19,6 +19,7 @@ class Settings;
class Paths;
class PubSub;
class TwitchChannel;
class SeventvEventAPI;
class TwitchIrcServer final : public AbstractIrcServer, public Singleton
{
@@ -41,6 +42,21 @@ public:
void reloadSevenTVGlobalEmotes();
void reloadAllSevenTVChannelEmotes();
/** Calls `func` with all twitch channels that have `emoteSetId` added. */
void forEachSeventvEmoteSet(const QString &emoteSetId,
std::function<void(TwitchChannel &)> func);
/** Calls `func` with all twitch channels where the seventv-user-id is `userId`. */
void forEachSeventvUser(const QString &userId,
std::function<void(TwitchChannel &)> func);
/**
* Checks if any channel still needs this `userID` or `emoteSetID`.
* If not, it unsubscribes from the respective messages.
*
* It's currently not possible to share emote sets among users,
* but it's a commonly requested feature.
*/
void dropSeventvChannel(const QString &userID, const QString &emoteSetID);
Atomic<QString> lastUserThatWhisperedMe;
const ChannelPtr whispersChannel;
@@ -49,6 +65,7 @@ public:
IndirectChannel watchingChannel;
PubSub *pubsub;
std::unique_ptr<SeventvEventAPI> seventvEventAPI;
const BttvEmotes &getBttvEmotes() const;
const FfzEmotes &getFfzEmotes() const;