summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/default_config.cfg4
-rw-r--r--doc/en/configure.txt6
-rw-r--r--src/core.py7
3 files changed, 16 insertions, 1 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index ff73ecc4..834c629c 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -143,6 +143,10 @@ information_buffer_popup_on = error roster warning help info
# one line, the popup will stay visible two second per additional lines
popup_time = 4
+# A list of words (or sentences) separated by colons (":"). All the
+# informational messages (described above) containing at least one of those
+# values will not be shown.
+filter_info_messages =
# Set to 'true' if you want to automatically rejoin the
# rooms when you're kicked or banned
diff --git a/doc/en/configure.txt b/doc/en/configure.txt
index dc802690..479f5a06 100644
--- a/doc/en/configure.txt
+++ b/doc/en/configure.txt
@@ -195,6 +195,12 @@ section of this documentation.
If the message takes more than one line, the popup will stay visible
two more second per additional lines
+*filter_info_messages*:: [empty]
+
+ A list of words or sentences separated by colons (":"). All the
+ informational mesages (described above) containing at least one of those
+ values will not be shown.
+
*autorejoin*:: false
set to 'true' if you want to automatically rejoin the
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):
"""