From: Marcus Eggenberger Date: Fri, 11 Jul 2008 12:01:28 +0000 (+0200) Subject: fixing other part of BR #208 (setting own away message) X-Git-Tag: 0.3.0~280 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=54407b4493c7b811fca07d9e36acd91836ac6431 fixing other part of BR #208 (setting own away message) --- 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)); }