summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-07 00:57:36 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-07 00:57:36 +0000
commit4f1a38535e74f93a1bff98f8fbd273205a47814c (patch)
tree8b70ecd0c74e41f7c27823e7e09f88a756f40d60
parent3d9ed2e409fab9c86519f3c0d4e118b29d17018b (diff)
downloadpoezio-4f1a38535e74f93a1bff98f8fbd273205a47814c.tar.gz
poezio-4f1a38535e74f93a1bff98f8fbd273205a47814c.tar.bz2
poezio-4f1a38535e74f93a1bff98f8fbd273205a47814c.tar.xz
poezio-4f1a38535e74f93a1bff98f8fbd273205a47814c.zip
Alternative nickname. fixed #1711
-rw-r--r--data/default_config.cfg23
-rw-r--r--src/gui.py5
2 files changed, 27 insertions, 1 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index cfe00206..b5d2a0e4 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -74,6 +74,29 @@ hide_exit_join = -1
hide_status_change = 120
+# set to 'true' if you want to automatically rejoin the
+# room when you're kicked
+autorejoin = false
+
+# If you want poezio to join
+# the room with an alternative nickname when
+# your nickname is already in use in the room you
+# wanted to join, put a non-empty value.
+# Else, poezio won't join the room
+# This value will be added to your nickname to
+# create the alternative nickname.
+# For example, if you set "_", and wanted to use
+# the nickname "john", your alternative nickname
+# will be "john_"
+alternative_nickname =
+
+# Limit the number of messages you want to receive when the
+# multiuserchat rooms send you recent history
+# 0: You won't receive any
+# -1: You will receive the maximum (default)
+# n: You will receive at most n messages
+muc_history_length = -1
+
# set to 'true' if you want to save logs of all the messages
# in files.
use_log = false
diff --git a/src/gui.py b/src/gui.py
index a5521452..604ba591 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -372,7 +372,10 @@ class Gui(object):
if code == '401':
self.add_message_to_room(room, _('To provide a password in order to join the room, type "/join / password" (replace "password" by the real password)'))
if code == '409':
- self.add_message_to_room(room, _('You can join the room with specifying an other nick, by typing "/join /other_nick"'))
+ if config.get('alternative_nickname', '') != '':
+ self.command_join('%s/%s'% (room.name, room.own_nick+config.get('alternative_nickname', '')))
+ else:
+ self.add_message_to_room(room, _('You can join the room with specifying an other nick, by typing "/join /other_nick"'))
self.refresh_window()
def private_message(self, stanza):