mirror of https://github.com/9001/r0c.git
option to always require admin to auth
This commit is contained in:
parent
6dd4f7648a
commit
61e7b65bc1
|
@ -46,6 +46,7 @@ def optgen(ap, pwd):
|
|||
ac.add_argument("-tpt", metavar="PORT", type=int, default=0, help="TLS telnet port, e.g. 2424 (disable with 0)")
|
||||
ac.add_argument("-tpn", metavar="PORT", type=int, default=0, help="TLS netcat port, e.g. 1515 (disable with 0)")
|
||||
ac.add_argument("-pw", metavar="PWD", type=u, default=pwd, help="admin password")
|
||||
ac.add_argument("--ara", action="store_true", help="admin-access requires auth (even for localhost)")
|
||||
ac.add_argument("--nsalt", metavar="TXT", type=u, default="lammo/", help="salt for generated nicknames based on IP")
|
||||
|
||||
ac = ap.add_argument_group("logging")
|
||||
|
|
|
@ -481,7 +481,7 @@ class VT100_Client(object):
|
|||
with self.world.mutex:
|
||||
self.default_config()
|
||||
self.user.client = self
|
||||
self.user.admin = self.adr[0] == "127.0.0.1" # TODO
|
||||
self.user.admin = self.adr[0] == "127.0.0.1" and not self.ar.ara
|
||||
|
||||
try:
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue