// 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);
}
void UserInputHandler::issueQuit(const QString &reason) {
- QString quitReason;
- if(reason.isEmpty())
- quitReason = network()->identityPtr()->quitReason();
- else
- quitReason = reason;
- emit putCmd("QUIT", serverEncode(quitReason));
+ emit putCmd("QUIT", serverEncode(reason));
}
void UserInputHandler::handleQuote(const BufferInfo &bufferInfo, const QString &msg) {