equal
deleted
inserted
replaced
237 if(lst.size() < 3) |
237 if(lst.size() < 3) |
238 { |
238 { |
239 qWarning("Net: Empty CHAT_STRING message"); |
239 qWarning("Net: Empty CHAT_STRING message"); |
240 return; |
240 return; |
241 } |
241 } |
242 QStringList tmp = lst; |
242 emit chatStringFromNet(QString("%1: %2").arg(lst[1]).arg(lst[2])); |
243 tmp.removeFirst(); |
|
244 emit chatStringFromNet(tmp); |
|
245 return; |
243 return; |
246 } |
244 } |
247 |
245 |
248 if (lst[0] == "ADD_TEAM") { |
246 if (lst[0] == "ADD_TEAM") { |
249 if(lst.size() != 21) |
247 if(lst.size() != 21) |
288 emit EnteredGame(); |
286 emit EnteredGame(); |
289 if (isChief) |
287 if (isChief) |
290 ConfigAsked(); |
288 ConfigAsked(); |
291 } |
289 } |
292 emit nickAdded(lst[i]); |
290 emit nickAdded(lst[i]); |
|
291 emit chatStringFromNet(QString(tr("* %1 joined")).arg(lst[i])); |
293 } |
292 } |
294 return; |
293 return; |
295 } |
294 } |
296 |
295 |
297 if(lst[0] == "LEFT") { |
296 if(lst[0] == "LEFT") { |
299 { |
298 { |
300 qWarning("Net: Bad LEFT message"); |
299 qWarning("Net: Bad LEFT message"); |
301 return; |
300 return; |
302 } |
301 } |
303 emit nickRemoved(lst[1]); |
302 emit nickRemoved(lst[1]); |
|
303 emit chatStringFromNet(QString(tr("* %1 left")).arg(lst[1])); |
304 return; |
304 return; |
305 } |
305 } |
306 |
306 |
307 if (lst[0] == "RUN_GAME") { |
307 if (lst[0] == "RUN_GAME") { |
308 netClientState = 5; |
308 netClientState = 5; |
480 |
480 |
481 void HWNewNet::chatLineToNet(const QString& str) |
481 void HWNewNet::chatLineToNet(const QString& str) |
482 { |
482 { |
483 if(str!="") { |
483 if(str!="") { |
484 RawSendNet(QString("CHAT_STRING")+delimeter+str); |
484 RawSendNet(QString("CHAT_STRING")+delimeter+str); |
485 emit(chatStringFromNet(QStringList(mynick) << str)); |
485 emit(chatStringFromNet(QString("%1: %2").arg(mynick).arg(str))); |
486 } |
486 } |
487 } |
487 } |
488 |
488 |
489 void HWNewNet::askRoomsList() |
489 void HWNewNet::askRoomsList() |
490 { |
490 { |