Project

General

Profile

0001-remember-own-away-message-when-going-away.patch

admin, 07/05/2008 02:21 PM

View differences:

src/client/networkmodel.cpp
590 590
  Q_UNUSED(column);
591 591
  QStringList toolTip(QString("<b>%1</b>").arg(nickName()));
592 592
  if(_ircUser->userModes() != "") toolTip[0].append(QString(" (%1)").arg(_ircUser->userModes()));
593
  if(_ircUser->isAway()) toolTip[0].append(" is away");
594
  if(!_ircUser->awayMessage().isEmpty()) toolTip[0].append(QString(" (%1)").arg(_ircUser->awayMessage()));
593
  if(_ircUser->isAway()) {
594
    toolTip[0].append(" is away");
595
    if(!_ircUser->awayMessage().isEmpty()) toolTip[0].append(QString(" (%1)").arg(_ircUser->awayMessage()));
596
  }
595 597
  if(!_ircUser->realName().isEmpty()) toolTip.append(_ircUser->realName());
596 598
  if(!_ircUser->ircOperator().isEmpty()) toolTip.append(QString("%1 %2").arg(nickName()).arg(_ircUser->ircOperator()));
597 599
  if(!_ircUser->suserHost().isEmpty()) toolTip.append(_ircUser->suserHost());
src/core/userinputhandler.cpp
57 57
  Q_UNUSED(bufferInfo)
58 58

  
59 59
  QString awayMsg = msg;
60
  IrcUser *me = network()->me();
60 61
  // if there is no message supplied we have to check if we are already away or not
61 62
  if(msg.isEmpty()) {
62
    IrcUser *me = network()->me();
63 63
    if(me && !me->isAway())
64 64
      awayMsg = networkConnection()->identity()->awayReason();
65 65
  }
66
  me->setAwayMessage(awayMsg);
66 67

  
67 68
  putCmd("AWAY", serverEncode(awayMsg));
68 69
}
69
-