]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/mod-snoop.c
mod-python: improve error logic for pyobj_from_usernode
[irc/evilnet/x3.git] / src / mod-snoop.c
index 7288da13ea12e9fc05ff3bc87e62f3deb1714e6b..fa067a4565396ec9a8cd1191994eab0509871674 100644 (file)
@@ -55,7 +55,11 @@ const char *snoop_module_deps[] = { NULL };
 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
@@ -243,6 +247,19 @@ snoop_channel_mode(struct userNode *who, struct chanNode *channel, char **modes,
                                                        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, " ");