Do not call external command for history lines in a MUC room
authorMikael Berthe <mikael@lilotux.net>
Tue, 27 Sep 2005 21:59:07 +0200
changeset 458 33dc3ca6e9ca
parent 457 2fd528c49173
child 459 8827bbef84a1
Do not call external command for history lines in a MUC room
mcabber/src/hooks.c
--- 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