diff mcabber/src/hooks.c @ 458:33dc3ca6e9ca

Do not call external command for history lines in a MUC room
author Mikael Berthe <mikael@lilotux.net>
date Tue, 27 Sep 2005 21:59:07 +0200
parents 39e173645f9c
children 644b8bf9ca4d
line wrap: on
line diff
--- a/mcabber/src/hooks.c	Tue Sep 27 21:58:01 2005 +0200
+++ b/mcabber/src/hooks.c	Tue Sep 27 21:59:07 2005 +0200
@@ -80,8 +80,9 @@
     hlog_write_message(jid, timestamp, FALSE, wmsg);
 
   // External command
-  // XXX We should avoid calling the function for history lines in MUC
-  hk_ext_cmd(jid, (is_groupchat ? 'G' : 'M'), 'R', NULL);
+  // (We do not call hk_ext_cmd() for history lines in MUC)
+  if (!is_groupchat || !timestamp)
+    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