equal
deleted
inserted
replaced
237 if(!m_hwserver->isChiefClient(this) || lst.size()<3) return; // error or permission denied :) |
237 if(!m_hwserver->isChiefClient(this) || lst.size()<3) return; // error or permission denied :) |
238 else m_gameCfg[lst[1]]=lst.mid(2); |
238 else m_gameCfg[lst[1]]=lst.mid(2); |
239 } |
239 } |
240 |
240 |
241 if(lst[0]=="ADDTEAM:") { |
241 if(lst[0]=="ADDTEAM:") { |
242 if(lst.size()<10) return; |
242 if(lst.size()<11) return; |
243 lst.pop_front(); |
243 lst.pop_front(); |
|
244 |
244 // add team ID |
245 // add team ID |
245 static unsigned int netTeamID=1; |
246 static unsigned int netTeamID=1; |
246 lst.insert(1, QString::number(netTeamID++)); |
247 lst.insert(1, QString::number(netTeamID++)); |
247 |
248 |
|
249 // creating color config for new team |
|
250 QString colorCfg=QString("CONFIG_PARAM%1TEAM_COLOR%1%2%1%3%1%4").arg(delimeter).arg(lst[0])\ |
|
251 .arg(netTeamID)\ |
|
252 .arg(lst.takeAt(2)); |
|
253 qDebug() << "color config:" << colorCfg; |
|
254 |
|
255 m_gameCfg[colorCfg.split(delimeter)[1]]=colorCfg.split(delimeter).mid(2); |
248 m_teamsCfg.push_back(lst); |
256 m_teamsCfg.push_back(lst); |
|
257 |
249 m_hwserver->sendOthers(this, QString("ADDTEAM:")+delimeter+lst.join(QString(delimeter))); |
258 m_hwserver->sendOthers(this, QString("ADDTEAM:")+delimeter+lst.join(QString(delimeter))); |
250 RawSendNet(QString("TEAM_ACCEPTED%1%2%1%3").arg(delimeter).arg(lst[0]).arg(lst[1])); |
259 RawSendNet(QString("TEAM_ACCEPTED%1%2%1%3").arg(delimeter).arg(lst[0]).arg(lst[1])); |
251 return; |
260 return; |
252 } |
261 } |
253 |
262 |