Ticket #3476: 3476_start_time_lobby_bot_v1.1.patch
File 3476_start_time_lobby_bot_v1.1.patch, 1.6 KB (added by , 8 years ago) |
---|
-
source/tools/XpartaMuPP/XpartaMuPP.py
class GameList(): 305 305 else: 306 306 logging.debug("change game (%s) state from %s to %s", JID, self.gameList[JID]['state'], 'running') 307 307 self.gameList[JID]['state'] = 'running' 308 308 self.gameList[JID]['nbp'] = data['nbp'] 309 309 self.gameList[JID]['players'] = data['players'] 310 if 'startTime' not in self.gameList[JID]: 311 self.gameList[JID]['startTime'] = str(round(time.time())) 310 312 311 313 ## Class which manages different game reports from clients ## 312 314 ## and calls leaderboard functions as appropriate. ## 313 315 class ReportManager(): 314 316 def __init__(self, leaderboard): -
source/lobby/XmppClient.cpp
void XmppClient::GUIGetGameList(ScriptIn 500 500 { 501 501 JSContext* cx = scriptInterface.GetContext(); 502 502 JSAutoRequest rq(cx); 503 503 504 504 scriptInterface.Eval("([])", ret); 505 const char* stats[] = { "name", "ip", "port", "state", "nbp", "maxnbp", " players", "mapName", "niceMapName", "mapSize", "mapType", "victoryCondition" };505 const char* stats[] = { "name", "ip", "port", "state", "nbp", "maxnbp", "startTime", "players", "mapName", "niceMapName", "mapSize", "mapType", "victoryCondition" }; 506 506 for(const glooxwrapper::Tag* const& t : m_GameList) 507 507 { 508 508 JS::RootedValue game(cx); 509 509 scriptInterface.Eval("({})", &game); 510 510