QTfrontend/netconnectedclient.cpp
changeset 573 e0cf483e68d6
parent 571 a6cea9fbbc59
child 574 1cafd9eb1a21
equal deleted inserted replaced
572:302ad5c3836d 573:e0cf483e68d6
    95     m_hwserver->sendNicks(this);
    95     m_hwserver->sendNicks(this);
    96     m_hwserver->sendOthers(this, QString("JOINED")+delimeter+client_nick);
    96     m_hwserver->sendOthers(this, QString("JOINED")+delimeter+client_nick);
    97     return;
    97     return;
    98   }
    98   }
    99 
    99 
   100   if(client_nick=="") return;
   100   if(client_nick=="")
       
   101   {
       
   102   	qWarning(QString("Net: Message from unnamed client: '%1'").arg(msg).toAscii().data());
       
   103   	return;
       
   104   }
   101 
   105 
   102   if (lst[0]=="START:") {
   106   if (lst[0]=="START:") {
   103     readyToStart=true;
   107     readyToStart=true;
   104     if(m_hwserver->shouldStart(this)) {
   108     if(m_hwserver->shouldStart(this)) {
   105       // start
   109       // start
   124     int newTeamHHNum = lst[3].toUInt();
   128     int newTeamHHNum = lst[3].toUInt();
   125     m_hwserver->hhnum+=newTeamHHNum-oldTeamHHNum;
   129     m_hwserver->hhnum+=newTeamHHNum-oldTeamHHNum;
   126     // create CONFIG_PARAM to save HHNUM at server from lst
   130     // create CONFIG_PARAM to save HHNUM at server from lst
   127     lst=QStringList("CONFIG_PARAM") << confstr << lst[3];
   131     lst=QStringList("CONFIG_PARAM") << confstr << lst[3];
   128     m_hwserver->sendOthers(this, lst.join(QString(delimeter)));
   132     m_hwserver->sendOthers(this, lst.join(QString(delimeter)));
       
   133     return;
   129   }
   134   }
   130 
   135 
   131   if(lst[0]=="CONFIG_PARAM") {
   136   if(lst[0]=="CONFIG_PARAM") {
   132     if (lst.size()<3) {
   137     if (lst.size()<3) {
   133       qWarning((QString("Net: Bad 'CONFIG_PARAM' message: ")+msg).toAscii().data());
   138       qWarning((QString("Net: Bad 'CONFIG_PARAM' message: ")+msg).toAscii().data());
   134       return;
   139       return;
   135     }
   140     }
   136     
   141 
   137     if(!m_hwserver->isChiefClient(this))
   142     if(!m_hwserver->isChiefClient(this))
   138     {
   143     {
   139       return; // permission denied
   144       return; // permission denied
   140     }
   145     }
   141     else m_hwserver->m_gameCfg[lst[1]]=lst.mid(2);
   146     else m_hwserver->m_gameCfg[lst[1]]=lst.mid(2);