Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/hooks.c @ 1892:ea3f9b4f3558
Add "delayed" argument to the message-in hooks
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 11 Apr 2010 17:20:32 +0200 |
parents | b210c3d0de1f |
children | 5d37cee8c6c6 |
line wrap: on
line diff
--- a/mcabber/mcabber/hooks.c Sun Apr 11 16:20:18 2010 +0200 +++ b/mcabber/mcabber/hooks.c Sun Apr 11 17:20:32 2010 +0200 @@ -197,6 +197,14 @@ unsigned mucnicklen = 0; const char *ename = NULL; gboolean attention = FALSE, mucprivmsg = FALSE; +#ifdef MODULES_ENABLE + gchar strdelay[32]; + + if (timestamp) + to_iso8601(strdelay, timestamp); + else + strdelay[0] = '\0'; +#endif if (encrypted == ENCRYPTED_PGP) message_flags |= HBB_PREFIX_PGPCRYPT; @@ -240,6 +248,7 @@ { "resource", resname }, { "message", msg }, { "groupchat", is_groupchat ? "true" : "false" }, + { "delayed", strdelay }, { NULL, NULL }, }; h_result = hk_run_handlers(HOOK_PRE_MESSAGE_IN, args); @@ -389,6 +398,7 @@ { "message", msg }, { "groupchat", is_groupchat ? "true" : "false" }, { "attention", attention ? "true" : "false" }, + { "delayed", strdelay }, { NULL, NULL }, }; hk_run_handlers(HOOK_POST_MESSAGE_IN, args);