summaryrefslogtreecommitdiff
path: root/src/multiuserchat.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r--src/multiuserchat.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index 3327b140..e0f202c1 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -55,7 +55,14 @@ class MultiUserChat(object):
else:
rooms = rooms.split(':')
for room in rooms:
- [roomname, nick] = room.split('/')
+ args = room.split('/')
+ if args[0] == '':
+ return
+ roomname = args[0]
+ if len(args) == 2:
+ nick = args[1]
+ else:
+ nick = config.get('default_nick', 'poezio')
self.handler.emit('join-room', room=roomname, nick=nick)
def send_message(self, room, message):