Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hooks.c @ 1642:cd67b29e04e3
Fix not execution of HOOK_INTERNAL
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Mon, 02 Nov 2009 19:11:29 +0200 |
parents | b008ac166b91 |
children | fca9a4c17432 |
comparison
equal
deleted
inserted
replaced
1641:c3c7d6d0348f | 1642:cd67b29e04e3 |
---|---|
525 { | 525 { |
526 const char *hook_command; | 526 const char *hook_command; |
527 char *buf; | 527 char *buf; |
528 char *cmdline; | 528 char *cmdline; |
529 | 529 |
530 hook_command = settings_opt_get(hookname); | |
531 if (!hook_command) | |
532 return; | |
533 | |
534 buf = g_strdup_printf("Running %s...", hookname); | |
535 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); | |
536 | |
537 cmdline = from_utf8(hook_command); | |
538 if (process_command(cmdline, TRUE) == 255) | |
539 mcabber_set_terminate_ui(); | |
540 | |
541 #ifdef MODULES_ENABLE | 530 #ifdef MODULES_ENABLE |
542 { | 531 { |
543 GSList *h = hk_handler_queue; | 532 GSList *h = hk_handler_queue; |
544 if (h) { | 533 if (h) { |
545 hk_arg_t args[] = { | 534 hk_arg_t args[] = { |
553 h = g_slist_next (h); | 542 h = g_slist_next (h); |
554 } | 543 } |
555 } | 544 } |
556 } | 545 } |
557 #endif | 546 #endif |
547 | |
548 hook_command = settings_opt_get(hookname); | |
549 if (!hook_command) | |
550 return; | |
551 | |
552 buf = g_strdup_printf("Running %s...", hookname); | |
553 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); | |
554 | |
555 cmdline = from_utf8(hook_command); | |
556 if (process_command(cmdline, TRUE) == 255) | |
557 mcabber_set_terminate_ui(); | |
558 | 558 |
559 g_free(cmdline); | 559 g_free(cmdline); |
560 g_free(buf); | 560 g_free(buf); |
561 } | 561 } |
562 | 562 |