summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.py4
-rw-r--r--src/gui.py18
2 files changed, 15 insertions, 7 deletions
diff --git a/src/client.py b/src/client.py
index 9840d259..d3561a86 100644
--- a/src/client.py
+++ b/src/client.py
@@ -20,8 +20,8 @@
import sys
# disable any printout (this would mess the display)
stderr = sys.stderr
-sys.stdout = open('/dev/null', 'w')
-sys.stderr = open('/dev/null', 'w')
+# sys.stdout = open('/dev/null', 'w')
+# sys.stderr = open('/dev/null', 'w')
from connection import Connection
from multiuserchat import MultiUserChat
diff --git a/src/gui.py b/src/gui.py
index eb5985c3..e2323c0a 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -130,7 +130,9 @@ class Room(object):
# New user
if not user:
self.users.append(User(nick, affiliation, show, status, role))
- return self.add_info(_('%(nick)s joined the room %(roomname)s') % {'nick':nick, 'roomname': self.name})
+ if not config.get('hide_enter_join', "false") == "true":
+ return self.add_info(_('%(nick)s joined the room %(roomname)s') % {'nick':nick, 'roomname': self.name})
+ return None
# nick change
if change_nick:
if user.nick == self.own_nick:
@@ -159,10 +161,14 @@ class Room(object):
# user quit
if status == 'offline' or role == 'none':
self.users.remove(user)
- return self.add_info(_('%s has left the room') % (nick))
+ if not config.get('hide_enter_join', "false") == "true":
+ return self.add_info(_('%s has left the room') % (nick))
+ return None
# status change
user.update(affiliation, show, status, role)
- return self.add_info(_('%(nick)s changed his/her status : %(a)s, %(b)s, %(c)s, %(d)s') % {'nick':nick, 'a':affiliation, 'b':role, 'c':show, 'd':status})
+ if not config.get('hide_status_change', "false") == "true":
+ return self.add_info(_('%(nick)s changed his/her status : %(a)s, %(b)s, %(c)s, %(d)s') % {'nick':nick, 'a':affiliation, 'b':role, 'c':show, 'd':status})
+ return None
class Gui(object):
@@ -378,12 +384,14 @@ class Gui(object):
msg = _("Error: %s") % stanza.getError()
else:
msg = room.on_presence(stanza, from_nick)
- if room == self.current_room():
+ if room == self.current_room():
+ self.window.user_win.refresh(room.users)
+ if room == self.current_room() and msg:
self.window.text_win.add_line(room, (datetime.now(), msg))
self.window.text_win.refresh(room.name)
self.window.user_win.refresh(room.users)
self.window.text_win.refresh()
- curses.doupdate()
+ curses.doupdate()
def room_iq(self, iq):
if len(sys.argv) > 1: