+class COMMON_EXPORT NetworkSplitEvent : public NetworkEvent
+{
+public:
+ explicit NetworkSplitEvent(EventManager::EventType type, Network* network, QString channel, QStringList users, QString quitMsg)
+ : NetworkEvent(type, network)
+ , _channel(std::move(channel))
+ , _users(std::move(users))
+ , _quitMsg(std::move(quitMsg))
+ {}
+
+ inline QString channel() const { return _channel; }
+ inline QStringList users() const { return _users; }
+ inline QString quitMessage() const { return _quitMsg; }
+
+protected:
+ explicit NetworkSplitEvent(EventManager::EventType type, QVariantMap& map, Network* network);
+ void toVariantMap(QVariantMap& map) const override;
+
+ inline QString className() const override { return "NetworkSplitEvent"; }
+ inline void debugInfo(QDebug& dbg) const override
+ {
+ NetworkEvent::debugInfo(dbg);
+ dbg.nospace() << ", channel = " << qPrintable(channel()) << ", users = " << users() << ", quitmsg = " << quitMessage();
+ }
+
+private:
+ QString _channel;
+ QStringList _users;
+ QString _quitMsg;
+
+ friend class NetworkEvent;
+};