From: Marcus Eggenberger Date: Sat, 14 Feb 2009 00:49:36 +0000 (+0100) Subject: fixes #525 - using 'away' as ultimate fallback if no away reason is specified X-Git-Tag: 0.4.0~61 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=35e22cad1de9084bc3ddf664bc43e5a620adf1ae;ds=sidebyside fixes #525 - using 'away' as ultimate fallback if no away reason is specified --- diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index c90e7f66..926fc976 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -379,7 +379,6 @@ void CoreSession::clientsConnected() { Identity *identity = 0; CoreNetwork *net = 0; IrcUser *me = 0; - QString awayReason; while(netIter != _networks.end()) { net = *netIter; netIter++; @@ -421,8 +420,6 @@ void CoreSession::clientsDisconnected() { if(identity->detachAwayEnabled() && !me->isAway()) { if(identity->detachAwayReasonEnabled()) awayReason = identity->detachAwayReason(); - else - awayReason = identity->awayReason(); net->setAutoAwayActive(true); net->userInputHandler()->handleAway(BufferInfo(), awayReason); } diff --git a/src/core/userinputhandler.cpp b/src/core/userinputhandler.cpp index e0449bef..8fe87b03 100644 --- a/src/core/userinputhandler.cpp +++ b/src/core/userinputhandler.cpp @@ -63,8 +63,12 @@ void UserInputHandler::handleAway(const BufferInfo &bufferInfo, const QString &m // if there is no message supplied we have to check if we are already away or not if(msg.isEmpty()) { - if(me && !me->isAway()) + if(me && !me->isAway()) { awayMsg = network()->identityPtr()->awayReason(); + if(awayMsg.isEmpty()) { + awayMsg = tr("away"); + } + } } if(me) me->setAwayMessage(awayMsg);