Remove any queued AutoWho for <nickname> if <nickname> quits. This
avoids sending a needless AutoWho for <nickname> that'll only either
result in "No such nickname" if we're lucky, or random results for
non-extended WHO if <nickname> happens to match the realname/etc of
other IRC users.
This should fix any remaining cases of join/quit resulting in AutoWho
output in the Status Buffer for a network.
}
+void CoreNetwork::cancelAutoWhoOneshot(const QString &channelOrNick)
+{
+ // Remove channel/nick from queue if it exists
+ _autoWhoQueue.removeAll(channelOrNick);
+
+ // The AutoWho timer will detect if the queue is empty and automatically stop, no need to
+ // manually control it.
+}
+
+
void CoreNetwork::setAutoWhoDelay(int delay)
{
_autoWhoTimer.setInterval(delay * 1000);
*/
void queueAutoWhoOneshot(const QString &channelOrNick);
+ /**
+ * Removes the given channel/nick from AutoWho queue for when it stops existing
+ *
+ * If not already in queue, nothing happens. This should only be used for nicknames and
+ * channels that have suddenly stopped existing (e.g. nick joins then quits).
+ *
+ * For when a periodic channel AutoWho finishes, see CoreNetwork::setAutoWhoDone()
+ *
+ * @param channelOrNick Channel or nickname to WHO
+ */
+ void cancelAutoWhoOneshot(const QString &channelOrNick);
+
bool setAutoWhoDone(const QString &channel);
void updateIssuedModes(const QString &requestedModes);
if (!ircuser)
return;
+ // Clear the user from the AutoWho queue if in it
+ // This avoids needlessly checking a user that quickly joins then parts
+ coreNetwork(e)->cancelAutoWhoOneshot(ircuser->nick());
+
ircuser->quit();
}