Revert "Reformat project"

This reverts commit 64e3e1160aa76d191740342ab3edc68807f890fb.
This commit is contained in:
2022-07-21 13:40:01 +01:00
parent 760e43b59a
commit 3229d9b806
57 changed files with 214 additions and 519 deletions

View File

@@ -1,18 +1,14 @@
from string import digits
from yaml import dump
import main
from yaml import dump
from modules.network import Network
from string import digits
class NetworkCommand:
def __init__(self, *args):
self.network(*args)
def network(
self, addr, authed, data, obj, spl, success, failure, info, incUsage, length
):
def network(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
if authed:
if length == 7:
if spl[1] == "add":
@@ -32,9 +28,7 @@ class NetworkCommand:
failure("Auth must be sasl, ns or none, not %s" % spl[5])
return
else:
main.network[spl[2]] = Network(
spl[2], spl[3], int(spl[4]), spl[5].lower(), spl[6].lower()
)
main.network[spl[2]] = Network(spl[2], spl[3], int(spl[4]), spl[5].lower(), spl[6].lower())
success("Successfully created network: %s" % spl[2])
main.saveConf("network")
return