X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=e0be7e6307c1a6301defc252e3c0e96a7190d236;hb=1f2784bfa1c1ce90defa32f13c78afd72c227bfd;hp=395cb7a30e5a2c97849f1842b7c08e5dba7bde0e;hpb=b33ea3ad0598e43621f3923e0fbc01e87b9b0031;p=quassel.git diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 395cb7a3..e0be7e63 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -494,13 +494,13 @@ bool CoreNetwork::cipherUsesCBC(const QString &target) } #endif /* HAVE_QCA2 */ -bool CoreNetwork::setAutoWhoDone(const QString &channel) +bool CoreNetwork::setAutoWhoDone(const QString &name) { - QString chan = channel.toLower(); - if (_autoWhoPending.value(chan, 0) <= 0) + QString chanOrNick = name.toLower(); + if (_autoWhoPending.value(chanOrNick, 0) <= 0) return false; - if (--_autoWhoPending[chan] <= 0) - _autoWhoPending.remove(chan); + if (--_autoWhoPending[chanOrNick] <= 0) + _autoWhoPending.remove(chanOrNick); return true; } @@ -1308,12 +1308,12 @@ void CoreNetwork::startAutoWhoCycle() _autoWhoQueue = channels(); } -void CoreNetwork::queueAutoWhoOneshot(const QString &channelOrNick) +void CoreNetwork::queueAutoWhoOneshot(const QString &name) { // Prepend so these new channels/nicks are the first to be checked // Don't allow duplicates - if (!_autoWhoQueue.contains(channelOrNick.toLower())) { - _autoWhoQueue.prepend(channelOrNick.toLower()); + if (!_autoWhoQueue.contains(name.toLower())) { + _autoWhoQueue.prepend(name.toLower()); } if (capEnabled(IrcCap::AWAY_NOTIFY)) { // When away-notify is active, the timer's stopped. Start a new cycle to who this channel. @@ -1322,16 +1322,6 @@ 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);