(svn r20967) -Add: infrastructure to send information to remote admins at specific intervals (dihedral)

This commit is contained in:
rubidium
2010-10-17 17:36:23 +00:00
parent 7cc8a363d8
commit b4ce7fad7f
7 changed files with 123 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#include "../debug.h"
#include "../strings_func.h"
#include "../date_func.h"
#include "network_admin.h"
#include "network_server.h"
#include "network_udp.h"
#include "network.h"
@@ -1702,14 +1703,26 @@ void NetworkServer_Tick(bool send_frame)
NetworkUDPAdvertise();
}
/** Yearly "callback". Called whenever the year changes. */
void NetworkServerYearlyLoop()
{
NetworkCheckRestartMap();
NetworkAdminUpdate(ADMIN_FREQUENCY_ANUALLY);
}
/** Monthly "callback". Called whenever the month changes. */
void NetworkServerMonthlyLoop()
{
NetworkAutoCleanCompanies();
NetworkAdminUpdate(ADMIN_FREQUENCY_MONTHLY);
if ((_cur_month % 3) == 0) NetworkAdminUpdate(ADMIN_FREQUENCY_QUARTERLY);
}
/** Daily "callback". Called whenever the date changes. */
void NetworkServerDailyLoop()
{
NetworkAdminUpdate(ADMIN_FREQUENCY_DAILY);
if ((_date % 7) == 3) NetworkAdminUpdate(ADMIN_FREQUENCY_WEEKLY);
}
const char *GetClientIP(NetworkClientInfo *ci)