summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-06-01 13:49:19 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-06-01 13:50:26 +0200
commit8f75e10d2fed7fdca09ba5f3cdaea70654a27303 (patch)
treea2bd65acc21de7176df30fc2e9c2f435777f02b0
parentab3c38270950435e0c25d2a6fb973e6bbfd04f77 (diff)
downloadpoezio-8f75e10d2fed7fdca09ba5f3cdaea70654a27303.tar.gz
poezio-8f75e10d2fed7fdca09ba5f3cdaea70654a27303.tar.bz2
poezio-8f75e10d2fed7fdca09ba5f3cdaea70654a27303.tar.xz
poezio-8f75e10d2fed7fdca09ba5f3cdaea70654a27303.zip
Use the password stored in the MucTab, with /join, if none is found otherwise
-rw-r--r--src/core/commands.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/commands.py b/src/core/commands.py
index 3830d72a..974c706f 100644
--- a/src/core/commands.py
+++ b/src/core/commands.py
@@ -387,13 +387,18 @@ def command_join(self, args, histo_length=None):
seconds = int(seconds)
else:
seconds = 0
- if password:
- tab.password = password
+ # If we didn’t have a password by now (from a bookmark or the
+ # explicit argument), just use the password that is stored in the
+ # tab because of our last join
+ if not password:
+ password = tab.password
muc.join_groupchat(self, room, nick, password,
histo_length,
current_status.message,
current_status.show,
seconds=seconds)
+ # Store in the tab the password we used, for later use
+ tab.password = password
if not tab:
self.open_new_room(room, nick, password=password)
muc.join_groupchat(self, room, nick, password,