summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 598cf82a..725cc8d8 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -2273,6 +2273,10 @@ class RosterInfoTab(Tab):
desc=_('Informs you of the last activity of a JID.'),
shortdesc=_('Get the activity of someone.'),
completion=self.core.completion_last_activity)
+ self.register_command('password', self.command_password,
+ usage='<password>',
+ shortdesc=_('Change your password'))
+
self.resize()
self.update_commands()
self.update_keys()
@@ -2465,6 +2469,21 @@ class RosterInfoTab(Tab):
self.core.information_win.rebuild_everything(self.core.information_buffer)
self.refresh()
+ def command_password(self, arg):
+ """
+ /password <password>
+ """
+ def callback(iq):
+ if iq['type'] == 'result':
+ self.core.information('Password updated', 'Account')
+ if config.get('password', ''):
+ config.silent_set('password', arg)
+ else:
+ self.core.information('Unable to change the password', 'Account')
+ self.core.xmpp.plugin['xep_0077'].change_password(arg, callback=callback)
+
+
+
def command_deny(self, arg):
"""
/deny [jid]