diff options
author | Fate <fate-tmw@googlemail.com> | 2009-09-11 05:38:13 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-09-11 05:38:13 +0000 |
commit | 80361c9a3b7fde14bbc094cc1dd241b52e33d9bc (patch) | |
tree | 91a482b0e62ea440bd51ee6985ddd25d1d23d8da /src/map/map.h | |
parent | 77af951f441c1c455550e5473b4fb30b4a5f5302 (diff) | |
download | tmwa-80361c9a3b7fde14bbc094cc1dd241b52e33d9bc.tar.gz tmwa-80361c9a3b7fde14bbc094cc1dd241b52e33d9bc.tar.bz2 tmwa-80361c9a3b7fde14bbc094cc1dd241b52e33d9bc.tar.xz tmwa-80361c9a3b7fde14bbc094cc1dd241b52e33d9bc.zip |
Added mapserver config option log_file to specify gzipped player action log file
Diffstat (limited to 'src/map/map.h')
-rw-r--r-- | src/map/map.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 <stdio.h> #include <stdarg.h> #include <time.h> +#include <sys/time.h> #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) |