summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-debug.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-09-18 18:44:03 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-09-18 18:44:03 +0200
commitc572e393e7399d125b543f4102d1baeb3b3b8391 (patch)
tree885fe3b4307148b377c3f5233c98e322a603c734 /src/plugins/irc/irc-debug.c
parentc3df7da6411a44da6b9fc0f52700372a1d074758 (diff)
downloadweechat-c572e393e7399d125b543f4102d1baeb3b3b8391.zip
Remove "category" for buffers (keep only name).
Diffstat (limited to 'src/plugins/irc/irc-debug.c')
-rw-r--r--src/plugins/irc/irc-debug.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-debug.c b/src/plugins/irc/irc-debug.c
index 2bc8e721f..e4e9df0ba 100644
--- a/src/plugins/irc/irc-debug.c
+++ b/src/plugins/irc/irc-debug.c
@@ -63,9 +63,13 @@ irc_debug_printf (struct t_irc_server *server, int send, int modified,
if (!irc_debug_buffer)
{
- irc_debug_buffer = weechat_buffer_new ("irc", "debug",
- NULL, NULL,
- &irc_debug_buffer_close_cb, NULL);
+ irc_debug_buffer = weechat_buffer_search ("irc", IRC_DEBUG_BUFFER_NAME);
+ if (!irc_debug_buffer)
+ {
+ irc_debug_buffer = weechat_buffer_new (IRC_DEBUG_BUFFER_NAME,
+ NULL, NULL,
+ &irc_debug_buffer_close_cb, NULL);
+ }
/* failed to create buffer ? then exit */
if (!irc_debug_buffer)
@@ -109,13 +113,13 @@ irc_debug_signal_debug_cb (void *data, const char *signal,
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
{
- if (weechat_strcasecmp ((char *)signal_data, "irc") == 0)
+ if (weechat_strcasecmp ((char *)signal_data, IRC_PLUGIN_NAME) == 0)
{
irc_debug ^= 1;
if (irc_debug)
- weechat_printf (NULL, _("%s: debug enabled"), "irc");
+ weechat_printf (NULL, _("%s: debug enabled"), IRC_PLUGIN_NAME);
else
- weechat_printf (NULL, _("%s: debug disabled"), "irc");
+ weechat_printf (NULL, _("%s: debug disabled"), IRC_PLUGIN_NAME);
}
}