diff mcabber/mcabber/hooks.c @ 2156:a54c084af4d6

Add a "carbon" parameter to the hook-{pre,post}-message-in hooks
author Mikael Berthe <mikael@lilotux.net>
date Sat, 04 Oct 2014 20:38:41 +0200
parents 8dc418af3e72
children 9e40d8f5bbe6
line wrap: on
line diff
--- a/mcabber/mcabber/hooks.c	Sat Oct 04 18:49:52 2014 +0200
+++ b/mcabber/mcabber/hooks.c	Sat Oct 04 20:38:41 2014 +0200
@@ -183,7 +183,7 @@
 
 void hk_message_in(const char *bjid, const char *resname,
                    time_t timestamp, const char *msg, LmMessageSubType type,
-                   guint encrypted)
+                   guint encrypted, gboolean carbon)
 {
   int new_guy = FALSE;
   int is_groupchat = FALSE; // groupchat message
@@ -251,6 +251,7 @@
       { "groupchat", is_groupchat ? "true" : "false" },
       { "delayed", strdelay },
       { "error", error_msg_subtype ? "true" : "false" },
+      { "carbon", carbon ? "true" : "false" },
       { NULL, NULL },
     };
     h_result = hk_run_handlers(HOOK_PRE_MESSAGE_IN, args);
@@ -405,6 +406,7 @@
       { "attention", attention ? "true" : "false" },
       { "delayed", strdelay },
       { "error", error_msg_subtype ? "true" : "false" },
+      { "carbon", carbon ? "true" : "false" },
       { NULL, NULL },
     };
     hk_run_handlers(HOOK_POST_MESSAGE_IN, args);