diff mcabber/src/hooks.c @ 1359:7daf906fbcdc

The command /quit can be used in bindings, hooks and sourced files (It used to work in bindings only)
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Nov 2007 13:05:57 +0100
parents 7bbfb0073f88
children f8321420ed7a
line wrap: on
line diff
--- a/mcabber/src/hooks.c	Sun Nov 11 12:22:41 2007 +0100
+++ b/mcabber/src/hooks.c	Sun Nov 11 13:05:57 2007 +0100
@@ -349,7 +349,8 @@
   scr_LogPrint(LPRINT_LOGNORM, "%s", buf);
 
   cmdline = from_utf8(hook_command);
-  process_command(cmdline, TRUE); // XXX Note: /quit won't work.
+  if (process_command(cmdline, TRUE) == 255)
+    mcabber_set_terminate_ui();
 
   g_free(cmdline);
   g_free(buf);