QTfrontend/netserver.cpp
changeset 569 4e41c9e9e4d1
parent 541 bc7be7f6d3e8
child 658 a7e625f5d9d0
equal deleted inserted replaced
568:d0690b7aa808 569:4e41c9e9e4d1
    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);