summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-11-01 12:01:27 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-11-01 12:01:27 +0100
commitb1416957da5b90e6d759f8f8e58c91e79be042f0 (patch)
tree1424c2a5e3ce1d1f19cdd7e0add09e6eab1e6cbc /src/plugins/irc
parentb3365a7a71eba9e83a295eefff815b42d24fb0fb (diff)
downloadweechat-b1416957da5b90e6d759f8f8e58c91e79be042f0.zip
Write ignore list in debug file when dumping irc data
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-debug.c3
-rw-r--r--src/plugins/irc/irc-ignore.c26
-rw-r--r--src/plugins/irc/irc-ignore.h1
3 files changed, 28 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-debug.c b/src/plugins/irc/irc-debug.c
index c46d5a99d..a7d1fa34c 100644
--- a/src/plugins/irc/irc-debug.c
+++ b/src/plugins/irc/irc-debug.c
@@ -27,6 +27,7 @@
#include "../weechat-plugin.h"
#include "irc.h"
#include "irc-debug.h"
+#include "irc-ignore.h"
#include "irc-redirect.h"
#include "irc-server.h"
@@ -52,7 +53,7 @@ irc_debug_signal_debug_dump_cb (void *data, const char *signal,
weechat_plugin->name);
irc_server_print_log ();
-
+ irc_ignore_print_log ();
irc_redirect_pattern_print_log ();
weechat_log_printf ("");
diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c
index e5118362a..aaba11509 100644
--- a/src/plugins/irc/irc-ignore.c
+++ b/src/plugins/irc/irc-ignore.c
@@ -272,7 +272,7 @@ irc_ignore_free (struct t_irc_ignore *ignore)
if (ignore->channel)
free (ignore->channel);
- /* remove filter from filters list */
+ /* remove ignore from list */
if (ignore->prev_ignore)
(ignore->prev_ignore)->next_ignore = ignore->next_ignore;
if (ignore->next_ignore)
@@ -328,3 +328,27 @@ irc_ignore_add_to_infolist (struct t_infolist *infolist,
return 1;
}
+
+/*
+ * irc_ignore_print_log: print ignore infos in log (usually for crash dump)
+ */
+
+void
+irc_ignore_print_log ()
+{
+ struct t_irc_ignore *ptr_ignore;
+
+ for (ptr_ignore = irc_ignore_list; ptr_ignore;
+ ptr_ignore = ptr_ignore->next_ignore)
+ {
+ weechat_log_printf ("");
+ weechat_log_printf ("[ignore (addr:0x%lx)]", ptr_ignore);
+ weechat_log_printf (" number . . . . . . . : %d", ptr_ignore->number);
+ weechat_log_printf (" mask . . . . . . . . : '%s'", ptr_ignore->mask);
+ weechat_log_printf (" regex_mask . . . . . : 0x%lx", ptr_ignore->regex_mask);
+ weechat_log_printf (" server . . . . . . . : '%s'", ptr_ignore->server);
+ weechat_log_printf (" channel. . . . . . . : '%s'", ptr_ignore->channel);
+ weechat_log_printf (" prev_ignore. . . . . : 0x%lx", ptr_ignore->prev_ignore);
+ weechat_log_printf (" next_ignore. . . . . : 0x%lx", ptr_ignore->next_ignore);
+ }
+}
diff --git a/src/plugins/irc/irc-ignore.h b/src/plugins/irc/irc-ignore.h
index 2831e65e5..71b1a6cb5 100644
--- a/src/plugins/irc/irc-ignore.h
+++ b/src/plugins/irc/irc-ignore.h
@@ -53,5 +53,6 @@ extern void irc_ignore_free (struct t_irc_ignore *ignore);
extern void irc_ignore_free_all ();
extern int irc_ignore_add_to_infolist (struct t_infolist *infolist,
struct t_irc_ignore *ignore);
+extern void irc_ignore_print_log ();
#endif /* __WEECHAT_IRC_IGNORE_H */