From 54407b4493c7b811fca07d9e36acd91836ac6431 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Fri, 11 Jul 2008 14:01:28 +0200 Subject: [PATCH 1/1] fixing other part of BR #208 (setting own away message) --- src/core/userinputhandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)); } -- 2.20.1