diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-31 04:08:47 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-01-31 04:08:47 +0000 |
commit | 6f34406477714668898e7a711e96268e2549d6c0 (patch) | |
tree | db864e9257c1fdc47ca461a4542bfb32762d9534 /src | |
parent | 0864c6e285121007e0f8fdcba0cf16124240cf7f (diff) | |
download | poezio-6f34406477714668898e7a711e96268e2549d6c0.tar.gz poezio-6f34406477714668898e7a711e96268e2549d6c0.tar.bz2 poezio-6f34406477714668898e7a711e96268e2549d6c0.tar.xz poezio-6f34406477714668898e7a711e96268e2549d6c0.zip |
fixed #1121
Diffstat (limited to 'src')
-rw-r--r-- | src/gui.py | 11 | ||||
-rw-r--r-- | src/poezio.cfg | 2 |
2 files changed, 6 insertions, 7 deletions
@@ -83,12 +83,8 @@ class Room(object): return info.encode('utf-8') def get_user_by_name(self, nick): - fd = open('fion', 'w') - fd.write(nick) - # fd.write('Looking for %s\n' % nick) for user in self.users: - # fd.write(user.nick) - if user.nick == nick: + if user.nick == nick.encode('utf-8'): return user return None @@ -103,10 +99,13 @@ class Room(object): self.users.append(User(nick, affiliation, show, status, role)) if nick.encode('utf-8') == self.own_nick: self.joined = True + return self.add_info("Your nickname is %s" % (nick)) return self.add_info("%s is in the room" % (nick)) change_nick = stanza.getStatusCode() == '303' kick = stanza.getStatusCode() == '307' user = self.get_user_by_name(nick) + if change_nick and not user: + return self.add_info('WTF: change nick for %s but user unknown'% nick) # New user if not user: self.users.append(User(nick, affiliation, show, status, role)) @@ -262,7 +261,7 @@ class Gui(object): curses.endwin() def on_connected(self, jid): - self.information("Welcome on Poezio \o/ !") + self.information("Welcome on Poezio \o/!") self.information("Your JID is %s" % jid) def join_room(self, room, nick): diff --git a/src/poezio.cfg b/src/poezio.cfg index 1abd41ac..7bd02ac5 100644 --- a/src/poezio.cfg +++ b/src/poezio.cfg @@ -2,7 +2,7 @@ resource = poezio default_nick = louiz_on_poezio server = louiz.org -rooms = test@chat.jabberfr.org:discussion@kikoo.louiz.org:fion@kikoo.louiz.org/FION:teub@kikoo.louiz.org +rooms = test@chat.jabberfr.org:discussion@kikoo.louiz.org logfile = logs port = 5222 |