539 |
539 |
540 emit nickCountUpdate(chatNicks->model()->rowCount()); |
540 emit nickCountUpdate(chatNicks->model()->rowCount()); |
541 |
541 |
542 // Normal quit |
542 // Normal quit |
543 if (message.isEmpty() || message == "bye") |
543 if (message.isEmpty() || message == "bye") |
|
544 { |
544 printChatString(nick, QString("*** ") + tr("%1 has left").arg(linkedNick(nick)), "Leave", false); |
545 printChatString(nick, QString("*** ") + tr("%1 has left").arg(linkedNick(nick)), "Leave", false); |
545 // Quit with custom player message |
|
546 else if (message.startsWith("User quit: ") && message.length() > 11) |
|
547 { |
|
548 QString playerMessage = QString(message); |
|
549 playerMessage.remove(0, 11); |
|
550 printChatString(nick, QString("*** ") + tr("%1 has left (message: \"%2\")").arg(linkedNick(nick)).arg(playerMessage.toHtmlEscaped()), "Leave", false); |
|
551 } |
|
552 // Quit with special PART message |
|
553 else if (message.startsWith("part: ") && message.length() > 6) |
|
554 { |
|
555 QString playerMessage = QString(message); |
|
556 playerMessage.remove(0, 6); |
|
557 printChatString(nick, QString("*** ") + tr("%1 has left (%2)").arg(linkedNick(nick).arg(playerMessage.toHtmlEscaped())), "Leave", false); |
|
558 } |
546 } |
559 // Quit with additional server message (i.e. ping timeout) |
547 // Quit with additional server message (i.e. ping timeout) |
560 else |
548 else |
561 { |
549 { |
562 printChatString(nick, QString("*** ") + tr("%1 has left (%2)").arg(linkedNick(nick)).arg(HWApplication::translate("server", message.toLatin1().constData()).toHtmlEscaped()), "Leave", false); |
550 printChatString(nick, QString("*** ") + tr("%1 has left (%2)").arg(linkedNick(nick)).arg(HWApplication::translate("server", message.toLatin1().constData()).toHtmlEscaped()), "Leave", false); |