diff options
| author | 2019-05-23 10:39:24 +0100 | |
|---|---|---|
| committer | 2019-05-23 10:39:24 +0100 | |
| commit | 9f2881323f3a9cbe061d3be1f06c7c8f43fe0f0d (patch) | |
| tree | 030e7380bd14baac94a9d1df08bf3c1caa43038b /modules | |
| parent | Show example usage when a user does not provide a setting value (diff) | |
| signature | ||
Only show register/identify advice when we're using `internal` auth
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/permissions/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/permissions/__init__.py b/modules/permissions/__init__.py index 86770d05..c636a972 100644 --- a/modules/permissions/__init__.py +++ b/modules/permissions/__init__.py @@ -2,7 +2,8 @@ import base64, os import scrypt from src import ModuleManager, utils -REQUIRES_IDENTIFY = ("You need to be identified to use that command " +REQUIRES_IDENTIFY = "You need to be identified to use that command" +REQUIRES_IDENTIFY_INTERNAL = ("You need to be identified to use that command " "(/msg %s register | /msg %s identify)") @utils.export("serverset", {"setting": "identity-mechanism", @@ -221,8 +222,11 @@ class Module(ModuleManager.BaseModule): return utils.consts.PERMISSION_FORCE_SUCCESS elif authenticated: if not identified_account: - return REQUIRES_IDENTIFY % (event["server"].nickname, - event["server"].nickname) + if identity_mechanism == "internal": + return REQUIRES_IDENTIFY_INTERNAL % ( + event["server"].nickname, event["server"].nickname) + else: + return REQUIRES_IDENTIFY else: return utils.consts.PERMISSION_FORCE_SUCCESS |
