Only show register/identify advice when we're using internal
auth
This commit is contained in:
parent
fef97bfcd8
commit
9f2881323f
1 changed files with 7 additions and 3 deletions
|
@ -2,7 +2,8 @@ import base64, os
|
||||||
import scrypt
|
import scrypt
|
||||||
from src import ModuleManager, utils
|
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)")
|
"(/msg %s register | /msg %s identify)")
|
||||||
|
|
||||||
@utils.export("serverset", {"setting": "identity-mechanism",
|
@utils.export("serverset", {"setting": "identity-mechanism",
|
||||||
|
@ -221,8 +222,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
return utils.consts.PERMISSION_FORCE_SUCCESS
|
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||||
elif authenticated:
|
elif authenticated:
|
||||||
if not identified_account:
|
if not identified_account:
|
||||||
return REQUIRES_IDENTIFY % (event["server"].nickname,
|
if identity_mechanism == "internal":
|
||||||
event["server"].nickname)
|
return REQUIRES_IDENTIFY_INTERNAL % (
|
||||||
|
event["server"].nickname, event["server"].nickname)
|
||||||
|
else:
|
||||||
|
return REQUIRES_IDENTIFY
|
||||||
else:
|
else:
|
||||||
return utils.consts.PERMISSION_FORCE_SUCCESS
|
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue