X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreuserinputhandler.cpp;h=a978fe2bf590d1e30c08baf53aa4a739dff1186c;hp=73aac48ae3cb8cfcba99ec943ca0cb1e57ed955c;hb=3966090a1e7093c417560f7ee13ab310215d9ccd;hpb=1b09aae7fe4eb3b560f87d3b1c1698e6bc91257b diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp index 73aac48a..a978fe2b 100644 --- a/src/core/coreuserinputhandler.cpp +++ b/src/core/coreuserinputhandler.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -545,7 +545,8 @@ void CoreUserInputHandler::handlePing(const BufferInfo &bufferInfo, const QStrin if (param.isEmpty()) param = QTime::currentTime().toString("hh:mm:ss.zzz"); - putCmd("PING", serverEncode(param)); + // Take priority so this won't get stuck behind other queued messages. + putCmd("PING", serverEncode(param), QByteArray(), true); } @@ -580,9 +581,10 @@ void CoreUserInputHandler::handleQuit(const BufferInfo &bufferInfo, const QStrin } -void CoreUserInputHandler::issueQuit(const QString &reason) +void CoreUserInputHandler::issueQuit(const QString &reason, bool forceImmediate) { - emit putCmd("QUIT", serverEncode(reason)); + // If needing an immediate QUIT (e.g. core shutdown), prepend this to the queue + emit putCmd("QUIT", serverEncode(reason), QByteArray(), forceImmediate); }