Implement registration at net-level
This commit is contained in:
parent
a78e05c0c3
commit
f7e1f2d221
|
@ -7,7 +7,15 @@ class RegCommand:
|
||||||
|
|
||||||
def reg(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
def reg(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||||||
if authed:
|
if authed:
|
||||||
if length == 3:
|
if length == 2:
|
||||||
|
if not spl[1] in main.network.keys():
|
||||||
|
failure("No such network: %s" % spl[1])
|
||||||
|
return
|
||||||
|
if for i in main.network[spl[1]].relays.keys():
|
||||||
|
regproc.registerAccount(spl[1], int(spl[2]))
|
||||||
|
success("Requested registration for all relays on %s" % spl[1])
|
||||||
|
return
|
||||||
|
elif length == 3:
|
||||||
if not spl[1] in main.network.keys():
|
if not spl[1] in main.network.keys():
|
||||||
failure("No such network: %s" % spl[1])
|
failure("No such network: %s" % spl[1])
|
||||||
return
|
return
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"swho": "swho <network> [<channel>]",
|
"swho": "swho <network> [<channel>]",
|
||||||
"list": "list [<network>]",
|
"list": "list [<network>]",
|
||||||
"exec": "exec <expr ...>",
|
"exec": "exec <expr ...>",
|
||||||
"reg": "reg <network> <num>",
|
"reg": "reg <network> [<num>]",
|
||||||
"confirm": "confirm <network> <num> <token>",
|
"confirm": "confirm <network> <num> <token>",
|
||||||
"pending": "pending [<network>]",
|
"pending": "pending [<network>]",
|
||||||
"authcheck": "authcheck [<network>]",
|
"authcheck": "authcheck [<network>]",
|
||||||
|
|
Loading…
Reference in New Issue