diff mcabber/src/hooks.c @ 453:39e173645f9c

External command is called for MUC messages
author Mikael Berthe <mikael@lilotux.net>
date Mon, 26 Sep 2005 22:36:18 +0200
parents 03bb57383cea
children 33dc3ca6e9ca
line wrap: on
line diff
--- a/mcabber/src/hooks.c	Mon Sep 26 22:08:48 2005 +0200
+++ b/mcabber/src/hooks.c	Mon Sep 26 22:36:18 2005 +0200
@@ -80,8 +80,8 @@
     hlog_write_message(jid, timestamp, FALSE, wmsg);
 
   // External command
-  if (!is_groupchat)
-    hk_ext_cmd(jid, 'M', 'R', NULL);
+  // XXX We should avoid calling the function for history lines in MUC
+  hk_ext_cmd(jid, (is_groupchat ? 'G' : 'M'), 'R', NULL);
 
   // We need to rebuild the list if the sender is unknown or
   // if the sender is offline/invisible and hide_offline_buddies is set
@@ -170,7 +170,10 @@
           arg_info = "IN";
         else if (info == 'S')
           arg_info = "OUT";
-
+        break;
+    case 'G':
+        arg_type = "MSG";
+        arg_info = "MUC";
         break;
     case 'S':
         arg_type = "STATUS";