diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-02 18:54:25 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-02 18:54:25 +0100 |
commit | 6e69f7f3ce22bf5537b1e02088b95352d04ec5cc (patch) | |
tree | b041426d6c655c4ba1c03d1a19a175d4b130a2b3 /src/plugins/demo | |
parent | 640ff6b51c249b44c382eb92c03dafbfb482bc91 (diff) | |
download | weechat-6e69f7f3ce22bf5537b1e02088b95352d04ec5cc.zip |
Remove debug plugin (merged to core), new debug variable for each plugin (no more signals for setting debug)
Diffstat (limited to 'src/plugins/demo')
-rw-r--r-- | src/plugins/demo/demo.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index a7e82d1c2..282f60ee0 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -43,35 +43,6 @@ WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_demo_plugin = NULL; #define weechat_plugin weechat_demo_plugin -int demo_debug = 0; - - -/* - * demo_debug_signal_debug_cb: callback for "debug" signal - */ - -int -demo_debug_signal_debug_cb (void *data, const char *signal, - const char *type_data, void *signal_data) -{ - /* make C compiler happy */ - (void) data; - (void) signal; - - if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0) - { - if (weechat_strcasecmp ((char *)signal_data, DEMO_PLUGIN_NAME) == 0) - { - demo_debug ^= 1; - if (demo_debug) - weechat_printf (NULL, _("%s: debug enabled"), DEMO_PLUGIN_NAME); - else - weechat_printf (NULL, _("%s: debug disabled"), DEMO_PLUGIN_NAME); - } - } - - return WEECHAT_RC_OK; -} /* * demo_printf_command_cb: demo command for printf @@ -139,7 +110,7 @@ demo_buffer_close_cb (void *data, struct t_gui_buffer *buffer) /* make C compiler happy */ (void) data; - if (demo_debug) + if (weechat_demo_plugin->debug) { weechat_printf (NULL, "buffer_close_cb: buffer = %x (%s)", @@ -368,7 +339,7 @@ demo_signal_cb (void *data, const char *signal, const char *type_data, /* make C compiler happy */ (void) data; - if (demo_debug) + if (weechat_demo_plugin->debug) { if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0) { @@ -416,8 +387,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_plugin = plugin; - demo_debug = weechat_config_boolean (weechat_config_get ("weechat.plugin.debug")); - weechat_hook_command ("demo_printf", N_("print some messages on current ubffer"), N_("[text]"), @@ -459,7 +428,6 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) "%I", &demo_infolist_command_cb, NULL); - weechat_hook_signal ("debug", &demo_debug_signal_debug_cb, NULL); weechat_hook_signal ("*", &demo_signal_cb, NULL); return WEECHAT_RC_OK; |