From 8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 5 Aug 2012 13:08:06 +0200 Subject: Add a filter_info_messages option - This option takes a list of words separated by colons - All the messages containing those words will not be shown --- src/core.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core.py b/src/core.py index f34a97af..b06d0009 100644 --- a/src/core.py +++ b/src/core.py @@ -884,6 +884,11 @@ class Core(object): """ Displays an informational message in the "Info" buffer """ + filter_messages = config.get('filter_info_messages', '').split(':') + for words in filter_messages: + if words and words in msg: + log.debug('Did not show the message:\n\t%s> %s', typ, msg) + return False nb_lines = self.information_buffer.add_message(msg, nickname=typ) if isinstance(self.current_tab(), tabs.RosterInfoTab): self.refresh_window() @@ -895,7 +900,7 @@ class Core(object): if self.information_win_size != 0: self.information_win.refresh() self.current_tab().input.refresh() - + return True def init_curses(self, stdscr): """ -- cgit v1.2.3