From 80361c9a3b7fde14bbc094cc1dd241b52e33d9bc Mon Sep 17 00:00:00 2001 From: Fate Date: Fri, 11 Sep 2009 05:38:13 +0000 Subject: Added mapserver config option log_file to specify gzipped player action log file --- src/map/map.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index c4e914f..71b091a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -2,8 +2,10 @@ #ifndef _MAP_H_ #define _MAP_H_ +#include #include #include +#include #include "mmo.h" #ifndef MAX @@ -684,6 +686,16 @@ int map_quit(struct map_session_data *); // npc int map_addnpc(int,struct npc_data *); +extern FILE *map_logfile; +#define MAP_LOG(format, args...) \ + if (map_logfile) { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + fprintf(map_logfile, "%ld.%06ld ", (long)tv.tv_sec, (long) tv.tv_usec); \ + fprintf(map_logfile, format, ##args); \ + fputc('\n', map_logfile); \ + } + // 床アイテム関連 int map_clearflooritem_timer(int,unsigned int,int,int); #define map_clearflooritem(id) map_clearflooritem_timer(0,0,id,1) -- cgit v1.2.3-60-g2f50