refactor: move event api initializations to TwitchIrcServer (#6198)
This commit is contained in:
@@ -25,6 +25,8 @@ class BttvEmotes;
|
||||
class FfzEmotes;
|
||||
class SeventvEmotes;
|
||||
class RatelimitBucket;
|
||||
class BttvLiveUpdates;
|
||||
class SeventvEventAPI;
|
||||
|
||||
class ITwitchIrcServer
|
||||
{
|
||||
@@ -68,6 +70,9 @@ public:
|
||||
virtual QString getLastUserThatWhisperedMe() const = 0;
|
||||
virtual void setLastUserThatWhisperedMe(const QString &user) = 0;
|
||||
|
||||
virtual void initEventAPIs(BttvLiveUpdates *bttvLiveUpdates,
|
||||
SeventvEventAPI *seventvEventAPI) = 0;
|
||||
|
||||
// Update this interface with TwitchIrcServer methods as needed
|
||||
};
|
||||
|
||||
@@ -154,6 +159,9 @@ public:
|
||||
QString getLastUserThatWhisperedMe() const override;
|
||||
void setLastUserThatWhisperedMe(const QString &user) override;
|
||||
|
||||
void initEventAPIs(BttvLiveUpdates *bttvLiveUpdates,
|
||||
SeventvEventAPI *seventvEventAPI) override;
|
||||
|
||||
protected:
|
||||
void initializeConnection(IrcConnection *connection, ConnectionType type);
|
||||
std::shared_ptr<Channel> createChannel(const QString &channelName);
|
||||
@@ -193,7 +201,7 @@ private:
|
||||
|
||||
std::mutex connectionMutex_;
|
||||
|
||||
pajlada::Signals::SignalHolder connections_;
|
||||
pajlada::Signals::SignalHolder signalHolder;
|
||||
|
||||
std::mutex lastMessageMutex_;
|
||||
std::queue<std::chrono::steady_clock::time_point> lastMessagePleb_;
|
||||
|
||||
Reference in New Issue
Block a user