src/oss2db/Award2Db.cpp
browsing at commit = c59f2dada9c7c473f3b891afbca12f87e7c08774
/*
* File: Award2Db.cpp
* Author: poul
*
* Created on 7. juni 2010, 19:41
*/
#include "Award2Db.h"
string Award2Db::getCommand() {
return "Award";
}
bool Award2Db::canProcess(OaStatStruct oss) {
if(oss.command != getCommand() || oss.parameters.size()<2 || oss.parameters.at(0)<0)
return false;
return true;
}
void Award2Db::process(OaStatStruct oss) {
if(!canProcess(oss))
return; //Invalid oss
string player = clientIdMap[oss.parameters.at(0)];
dp->addAward(oss.second,player,oss.parameters.at(1));
}