36 lines
616 B
C++
36 lines
616 B
C++
#include "logging.h"
|
|
#include "gamelist.h"
|
|
|
|
#define DEFAULT_TIMEOUT 180
|
|
|
|
GameList::GameList(Config& conf)
|
|
{
|
|
int interval = conf.getInteger("global", "game_timeout", DEFAULT_TIMEOUT);
|
|
TimerService::registerTimer(new Timer(new CleanupEvent(this), interval));
|
|
}
|
|
|
|
GameList::~GameList()
|
|
{
|
|
}
|
|
|
|
void GameList::cleanup()
|
|
{
|
|
}
|
|
|
|
long GameList::getLastMod()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
Iterator<GameEntry>* GameList::createIterator()
|
|
{
|
|
return new NullIterator<GameEntry>();
|
|
}
|
|
|
|
void GameList::addGame(int gameid, NetPkt* pkt)
|
|
{
|
|
char buf[64];
|
|
pkt->show(buf, sizeof(buf));
|
|
LogSystem::log(LOG_NOTICE, "Adding Game %d: %s", gameid, buf);
|
|
}
|