summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-08-05 13:08:06 +0200
committermathieui <mathieui@mathieui.net>2012-08-05 13:08:06 +0200
commit8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9 (patch)
treead6642f6527c6a3037137216c194ccd20a75a000 /src/core.py
parentec5bb3b213385405105ef90eccb1b1f093004b22 (diff)
downloadpoezio-8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9.tar.gz
poezio-8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9.tar.bz2
poezio-8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9.tar.xz
poezio-8c0b3f8ae5ef6d61eefd9cdd9c6acec5a32fd7f9.zip
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
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py7
1 files changed, 6 insertions, 1 deletions
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):
"""