equal
deleted
inserted
replaced
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
18 */ |
18 */ |
19 |
19 |
20 #include <QMessageBox> |
20 #include <QMessageBox> |
21 #include <QDebug> |
21 #include <QDebug> |
22 #include <QTextDocument> |
|
23 |
22 |
24 #include "hwconsts.h" |
23 #include "hwconsts.h" |
25 #include "newnetclient.h" |
24 #include "newnetclient.h" |
26 #include "proto.h" |
25 #include "proto.h" |
27 #include "gameuiconfig.h" |
26 #include "gameuiconfig.h" |
277 return; |
276 return; |
278 } |
277 } |
279 QStringList tmp = lst; |
278 QStringList tmp = lst; |
280 tmp.removeFirst(); |
279 tmp.removeFirst(); |
281 if (netClientState == 2) |
280 if (netClientState == 2) |
282 emit chatStringLobby(Qt::escape(tmp.join("\n"))); |
281 emit chatStringLobby(tmp.join("\n")); |
283 else |
282 else |
284 emit chatStringFromNet(Qt::escape(tmp.join("\n"))); |
283 emit chatStringFromNet(tmp.join("\n")); |
285 return; |
284 return; |
286 } |
285 } |
287 |
286 |
288 if (lst[0] == "READY") { |
287 if (lst[0] == "READY") { |
289 if(lst.size() != 2) |
288 if(lst.size() != 2) |
646 } |
645 } |
647 |
646 |
648 QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg) |
647 QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg) |
649 { |
648 { |
650 if(msg.left(4) == "/me ") |
649 if(msg.left(4) == "/me ") |
651 return QString("* %1 %2").arg(Qt::escape(nick)).arg(Qt::escape(msg.mid(4))); |
650 return QString("* %1 %2").arg(nick).arg(msg.mid(4)); |
652 else |
651 else |
653 return QString("%1: %2").arg(Qt::escape(nick)).arg(Qt::escape(msg)); |
652 return QString("%1: %2").arg(nick).arg(msg); |
654 } |
653 } |
655 |
654 |
656 void HWNewNet::kickPlayer(const QString & nick) |
655 void HWNewNet::kickPlayer(const QString & nick) |
657 { |
656 { |
658 RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick)); |
657 RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick)); |