*
* This file is part of x3.
*
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
static int finalized;
int snoop_finalize(void);
-#define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp , ## ARGS)
+#if defined(GCC_VARMACROS)
+# define SNOOP(FORMAT, ARGS...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp, ARGS)
+#elif defined(C99_VARMACROS)
+# define SNOOP(FORMAT, ...) send_channel_message(snoop_cfg.channel, snoop_cfg.bot, "%s "FORMAT, timestamp, __VA_ARGS__)
+#endif
#define UPDATE_TIMESTAMP() strftime(timestamp, sizeof(timestamp), "[%H:%M:%S]", localtime(&now))
static void
if (user->uplink->burst && !snoop_cfg.show_bursts) return;
if (user->handle_info) {
UPDATE_TIMESTAMP();
+ /* TODO: show old_handle info -> new handle info if they
+ * re-authed or something.
+ */
SNOOP("$bAUTH$b %s as %s", user->nick, user->handle_info->handle);
}
}
tg = tmp;
break;
}
+ case 'h':
+ {
+ strcat(targets, " ");
+ if ((tmp = strchr(tg, ' ')))
+ *tmp++ = 0;
+ if((un = GetUserN(tg)))
+ strcat(targets, un->nick);
+ else
+ strcat(targets, tg);
+ if(tmp)
+ tg = tmp;
+ break;
+ }
case 'v':
{
strcat(targets, " ");