logging missing network actions in sqlite; run astyle.

This commit is contained in:
floty
2012-01-05 20:54:27 +00:00
parent a327ac02e5
commit 3a659dd5d5
16 changed files with 263 additions and 193 deletions
+21 -2
View File
@@ -266,15 +266,18 @@ Log::logNewHandMsg(int handID, unsigned dealerPosition, int smallBlind, unsigned
// log blinds
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND) {
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND && (*it_c)->getMySet()>0) {
logPlayerAction(GAME_STATE_PREFLOP,smallBlindPosition,LOG_ACTION_SMALL_BLIND,(*it_c)->getMySet());
}
}
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND) {
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND && (*it_c)->getMySet()>0) {
logPlayerAction(GAME_STATE_PREFLOP,bigBlindPosition,LOG_ACTION_BIG_BLIND,(*it_c)->getMySet());
}
}
// (*it_c)->getMySet() ist ein Hack, da es im Internetspiel vorkam, dass ein Spieler zweimal geloggt wurde mit Blind - einmal jedoch mit $0
// !! TODO !! Hack
}
@@ -364,6 +367,22 @@ Log::logPlayerAction(GameState bero, int seat, PlayerActionLog action, int amoun
sql += ",'wins game'";
sql += ",NULL";
break;
case LOG_ACTION_LEFT:
sql += ",'has left the game'";
sql += ",NULL";
break;
case LOG_ACTION_KICKED:
sql += ",'was kicked from the game'";
sql += ",NULL";
break;
case LOG_ACTION_ADMIN:
sql += ",'is game admin now'";
sql += ",NULL";
break;
case LOG_ACTION_JOIN:
sql += ",'has joined the game'";
sql += ",NULL";
break;
default:
return;
}
+3 -1
View File
@@ -141,7 +141,9 @@ public:
bool checkIfINeedToShowCards();
void markRemoteAction() {}
unsigned getTimeSecSinceLastRemoteAction() const {return 0;}
unsigned getTimeSecSinceLastRemoteAction() const {
return 0;
}
private:
mutable boost::recursive_mutex m_syncMutex;