X-Git-Url: http://git.pk910.de/?p=srvx.git;a=blobdiff_plain;f=src%2Fmod-snoop.c;h=899309d59e6004b6e43ac1a7a698d4afc4a977d3;hp=11a0e55050cc5bb12ae3f5cdf6e6cac97aae30f5;hb=4a2c9aa9ab119a212d78c6a3a73261de56800251;hpb=007cc230a68daa6785f28a979e67ad9e67b1c87a diff --git a/src/mod-snoop.c b/src/mod-snoop.c index 11a0e55..899309d 100644 --- a/src/mod-snoop.c +++ b/src/mod-snoop.c @@ -42,7 +42,6 @@ #include #endif -extern time_t now; static struct { struct chanNode *channel; struct userNode *bot; @@ -56,7 +55,7 @@ static int finalized; int snoop_finalize(void); #define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS) -#define UPDATE_TIMESTAMP() strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now)) +#define UPDATE_TIMESTAMP() do { time_t feh = now; strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&feh)); } while (0) static void snoop_nick_change(struct userNode *user, const char *old_nick) {