summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
Diffstat (limited to 'poezio')
-rw-r--r--poezio/config.py1
-rw-r--r--poezio/core/commands.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 9c06d25b..5ee4a2b4 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -33,6 +33,7 @@ DEFAULT_CONFIG = {
'autorejoin_delay': '5',
'autorejoin': False,
'beep_on': 'highlight private invite disconnect',
+ 'bookmark_on_join': True,
'ca_cert_path': '',
'certificate': '',
'certfile': '',
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index ab0ced9a..91d98030 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -406,6 +406,10 @@ class CommandCore:
tab.password = password
tab.join()
+ if config.get('bookmark_on_join'):
+ method = 'remote' if config.get('use_remote_bookmarks') else 'local'
+ self._add_bookmark('%s/%s' % (room, nick), True, password, method)
+
if tab == self.core.current_tab():
tab.refresh()
self.core.doupdate()