summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/room.py b/src/room.py
index 45ebddbd..5d4c4ce6 100644
--- a/src/room.py
+++ b/src/room.py
@@ -24,6 +24,7 @@ import common
import theme
import logging
+import curses
log = logging.getLogger(__name__)
@@ -77,6 +78,10 @@ class Room(TextBuffer):
self.set_color_state(theme.COLOR_TAB_HIGHLIGHT)
color = theme.COLOR_HIGHLIGHT_NICK
break
+ if color:
+ beep_on = config.get('beep_on', 'highlight private').split()
+ if 'highlight' in beep_on and 'message' not in beep_on:
+ curses.beep()
return color
def get_user_by_name(self, nick):
@@ -95,7 +100,7 @@ class Room(TextBuffer):
"""
self.color_state = color
- def add_message(self, txt, time=None, nickname=None, forced_user=None, nick_color=None):
+ def add_message(self, txt, time=None, nickname=None, forced_user=None, nick_color=None, history=None):
"""
Note that user can be None even if nickname is not None. It happens
when we receive an history message said by someone who is not
@@ -130,7 +135,7 @@ class Room(TextBuffer):
self.messages.append(message)
for window in self.windows: # make the associated windows
# build the lines from the new message
- nb = window.build_new_message(message)
+ nb = window.build_new_message(message, history=history)
if window.pos != 0:
window.scroll_up(nb)
return nb