comparison mcabber/mcabber/hooks.c @ 1887:b210c3d0de1f

Provide raw message in message-in hooks
author Mikael Berthe <mikael@lilotux.net>
date Sat, 10 Apr 2010 21:56:53 +0200
parents 2e133fc0e3d9
children ea3f9b4f3558
comparison
equal deleted inserted replaced
1886:19f56bb2c64c 1887:b210c3d0de1f
236 { 236 {
237 guint h_result; 237 guint h_result;
238 hk_arg_t args[] = { 238 hk_arg_t args[] = {
239 { "jid", bjid }, 239 { "jid", bjid },
240 { "resource", resname }, 240 { "resource", resname },
241 { "message", wmsg }, 241 { "message", msg },
242 { "groupchat", is_groupchat ? "true" : "false" }, 242 { "groupchat", is_groupchat ? "true" : "false" },
243 { NULL, NULL }, 243 { NULL, NULL },
244 }; 244 };
245 h_result = hk_run_handlers(HOOK_PRE_MESSAGE_IN, args); 245 h_result = hk_run_handlers(HOOK_PRE_MESSAGE_IN, args);
246 if (h_result == HOOK_HANDLER_RESULT_NO_MORE_HANDLER_DROP_DATA) { 246 if (h_result == HOOK_HANDLER_RESULT_NO_MORE_HANDLER_DROP_DATA) {
384 #ifdef MODULES_ENABLE 384 #ifdef MODULES_ENABLE
385 { 385 {
386 hk_arg_t args[] = { 386 hk_arg_t args[] = {
387 { "jid", bjid }, 387 { "jid", bjid },
388 { "resource", resname }, 388 { "resource", resname },
389 { "message", wmsg }, 389 { "message", msg },
390 { "groupchat", is_groupchat ? "true" : "false" }, 390 { "groupchat", is_groupchat ? "true" : "false" },
391 { "attention", attention ? "true" : "false" }, 391 { "attention", attention ? "true" : "false" },
392 { NULL, NULL }, 392 { NULL, NULL },
393 }; 393 };
394 hk_run_handlers(HOOK_POST_MESSAGE_IN, args); 394 hk_run_handlers(HOOK_POST_MESSAGE_IN, args);