diff options
| author | 2018-09-30 22:11:37 +0100 | |
|---|---|---|
| committer | 2018-09-30 22:11:37 +0100 | |
| commit | 31c19aec69e7c67b7951b867eb025cb16ebc150b (patch) | |
| tree | f2d049c6bf4a1fe5616d578c93b26127cd0ba9bf | |
| parent | Update a reference from `buffer` to `target.buffer` in modules/commands.py (diff) | |
| signature | ||
Added setpassword command to modules/permissions.py
| -rw-r--r-- | modules/permissions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/permissions.py b/modules/permissions.py index 57b667d1..c3e21779 100644 --- a/modules/permissions.py +++ b/modules/permissions.py @@ -104,6 +104,16 @@ class Module(ModuleManager.BaseModule): else: event["stderr"].write("This nickname is already registered") + @Utils.hook("received.command.setpassword", authenticated=True, min_args=1) + def set_password(self, event): + """ + :help: Change your password + :usage: <password> + """ + hash, salt = self._make_hash(event["args"]) + event["user"].set_setting("authentication", [hash, salt]) + event["stdout"].write("Set your password") + @Utils.hook("received.command.logout", private_only=True) def logout(self, event): """ |
