core: Cancel nickname AutoWho on IrcUser quit
[quassel.git] / src / core / corenetwork.cpp
index fcafde4..395cb7a 100644 (file)
@@ -1322,6 +1322,16 @@ void CoreNetwork::queueAutoWhoOneshot(const QString &channelOrNick)
 }
 
 
+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);