equal
deleted
inserted
replaced
59 } |
59 } |
60 |
60 |
61 void HWNetServer::ClientDisconnect(HWConnectedClient* client) |
61 void HWNetServer::ClientDisconnect(HWConnectedClient* client) |
62 { |
62 { |
63 QList<HWConnectedClient*>::iterator it=std::find(connclients.begin(), connclients.end(), client); |
63 QList<HWConnectedClient*>::iterator it=std::find(connclients.begin(), connclients.end(), client); |
64 if(it==connclients.end()) return; |
64 if(it==connclients.end()) |
|
65 { |
|
66 qWarning("Unknown client disconnected"); |
|
67 return; |
|
68 } |
65 for(QList<QStringList>::iterator tmIt=(*it)->m_teamsCfg.begin(); tmIt!=(*it)->m_teamsCfg.end(); ++tmIt) { |
69 for(QList<QStringList>::iterator tmIt=(*it)->m_teamsCfg.begin(); tmIt!=(*it)->m_teamsCfg.end(); ++tmIt) { |
66 sendOthers(*it, QString("REMOVETEAM:")+delimeter+*(tmIt->begin()) + delimeter + *(tmIt->begin()+1)); |
70 sendOthers(*it, QString("REMOVETEAM:")+delimeter+*(tmIt->begin()) + delimeter + *(tmIt->begin()+1)); |
67 } |
71 } |
68 sendOthers(*it, QString("LEFT")+delimeter+client->client_nick); |
72 sendOthers(*it, QString("LEFT")+delimeter+client->client_nick); |
69 connclients.erase(it); |
73 connclients.erase(it); |