X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fuserinputhandler.cpp;h=1bd29bd3af368686c733b7ef44dad4bba36a3a1a;hp=c42c475f1a969ea4997522ccfe02c9976cb6003a;hb=54407b4493c7b811fca07d9e36acd91836ac6431;hpb=76d08e513d6aad5964786edc49f172d8b9481951 diff --git a/src/core/userinputhandler.cpp b/src/core/userinputhandler.cpp index c42c475f..1bd29bd3 100644 --- a/src/core/userinputhandler.cpp +++ b/src/core/userinputhandler.cpp @@ -57,13 +57,16 @@ void UserInputHandler::handleAway(const BufferInfo &bufferInfo, const QString &m Q_UNUSED(bufferInfo) QString awayMsg = msg; + IrcUser *me = network()->me(); + // if there is no message supplied we have to check if we are already away or not if(msg.isEmpty()) { - IrcUser *me = network()->me(); if(me && !me->isAway()) awayMsg = networkConnection()->identity()->awayReason(); } - + if(me) + me->setAwayMessage(awayMsg); + putCmd("AWAY", serverEncode(awayMsg)); }