- Netsplit();
-
- //! Add a user to the netsplit
- /** Call this method if you noticed a netsplit.
- * \note This method doesn't check if it really is a netsplit.
- * \note Check with isNetsplit(const QString &quitMessage) before calling it!
- *
- * \param sender The sender string of the quitting user
- * \param channels The channels that user shared with us
- * \param msg The quit message
- */
- void userQuit(const QString &sender, const QStringList &channels, const QString &msg);
-
- //! Remove a user from the netsplit
- /** Call this method if a user joined after a netsplit occured.
-
- *
- * \param sender The sender string of the joined user
- * \param channels The channels that user shares with us
- * \return true if user was found in the netsplit
- */
- bool userJoined(const QString &sender, const QString &channel);
-
- //! Check if a string matches the criteria for a netsplit
- /** \param quitMessage The message to be checked
- * \return true if the message is a netsplit
- */
- static bool isNetsplit(const QString &quitMessage);
+ Netsplit(Network *network, QObject *parent = nullptr);
+
+ inline Network *network() const { return _network; }
+
+ //! Add a user to the netsplit
+ /** Call this method if you noticed a netsplit.
+ * \note This method doesn't check if it really is a netsplit.
+ * \note Check with isNetsplit(const QString &quitMessage) before calling it!
+ *
+ * \param sender The sender string of the quitting user
+ * \param channels The channels that user shared with us
+ * \param msg The quit message
+ */
+ void userQuit(const QString &sender, const QStringList &channels, const QString &msg);
+
+ //! Remove a user from the netsplit
+ /** Call this method if a user joined after a netsplit occured.
+ *
+ * \param sender The sender string of the joined user
+ * \param channel The channel that user shares with us
+ * \return true if user was found in the netsplit
+ */
+ bool userJoined(const QString &sender, const QString &channel);
+
+ //! Check if user has joined since netsplit
+ /** This method shows if a user has already joined after being hit by netsplit
+ * \note The method doesn't check if the user was recorded in the netsplit!
+ *
+ * \param sender The sender string of the user
+ * \param channel The channel the user shares with us
+ * \return true if user joined after a netsplit
+ */
+ bool userAlreadyJoined(const QString &sender, const QString &channel);
+
+ //! Add mode to user
+ /** Use this method to buffer userspecific channel modes until netsplitJoin is emitted.
+ *
+ * \param sender The sender string of the user
+ * \param channel The channel the user shares with us
+ * \return true if user joined after a netsplit
+ */
+ void addMode(const QString &sender, const QString &channel, const QString &mode);
+
+ //! Check if a string matches the criteria for a netsplit
+ /** \param quitMessage The message to be checked
+ * \return true if the message is a netsplit
+ */
+ static bool isNetsplit(const QString &quitMessage);