X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreuserinputhandler.cpp;h=12c13cdcb63183c705a1156d0972745395cfa72a;hb=6d77f281c4e9862ab00a00cedf2de941046f1421;hp=24d5f8b8a9216dae94d9b3a55d228fc171b2d518;hpb=3972e140226f32760bb2606650f93132c188b2dc;p=quassel.git diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp index 24d5f8b8..12c13cdc 100644 --- a/src/core/coreuserinputhandler.cpp +++ b/src/core/coreuserinputhandler.cpp @@ -368,12 +368,17 @@ void CoreUserInputHandler::handleKeyx(const BufferInfo &bufferInfo, const QStrin parms.prepend(bufferInfo.bufferName()); else if (parms.count() != 1) { emit displayMsg(Message::Info, bufname, - tr("[usage] /keyx [] Initiates a DH1080 key exchange with the target.")); + tr("[usage] /keyx [] Initiates a DH1080 key exchange with the target.")); return; } QString target = parms.at(0); + if (network()->isChannelName(target)) { + emit displayMsg(Message::Info, bufname, tr("It is only possible to exchange keys in a query buffer.")); + return; + } + Cipher *cipher = network()->cipher(target); if (!cipher) // happens when there is no CoreIrcChannel for the target return;