fixing other part of BR #208 (setting own away message)
authorMarcus Eggenberger <egs@quassel-irc.org>
Fri, 11 Jul 2008 12:01:28 +0000 (14:01 +0200)
committerMarcus Eggenberger <egs@quassel-irc.org>
Fri, 11 Jul 2008 12:01:38 +0000 (14:01 +0200)
src/core/userinputhandler.cpp

index c42c475..1bd29bd 100644 (file)
@@ -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));
 }