src/oss2db/Ctf1f2Db.cpp
browsing at commit = 9c9925de9f32417faf33691742b7f07a7198dfe8
/*
* File: Ctf1f2Db.cpp
* Author: poul
*
* Created on 11. januar 2011, 20:48
*/
#include "Ctf1f2Db.hpp"
string Ctf1f2Db::getCommand() {
return "1FCTF";
}
bool Ctf1f2Db::canProcess(OaStatStruct oss) {
if(oss.command != getCommand() || oss.parameters.size()<3)
return false;
return true;
}
void Ctf1f2Db::process(OaStatStruct oss) {
if(!canProcess(oss))
return; //Invalid oss
string player = "";
if(oss.parameters.at(0)!=-1)
player= clientIdMap.at(oss.parameters.at(0));
dp->addCtf1f(oss.second,player,oss.parameters.at(1) /*team*/, oss.parameters.at(2) /*event*/);
}