|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import main
|
|
|
|
|
import modules.chankeep
|
|
|
|
|
|
|
|
|
|
class JoinCommand:
|
|
|
|
|
def __init__(self, *args):
|
|
|
|
@ -6,7 +7,14 @@ class JoinCommand:
|
|
|
|
|
|
|
|
|
|
def join(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
|
|
|
|
if authed:
|
|
|
|
|
if length == 4:
|
|
|
|
|
if length == 3:
|
|
|
|
|
if not spl[1] in main.network.keys():
|
|
|
|
|
failure("Network does not exist: %s" % spl[1])
|
|
|
|
|
return
|
|
|
|
|
modules.chankeep.joinSingle(spl[1], spl[2])
|
|
|
|
|
success("Joined %s" % spl[2])
|
|
|
|
|
|
|
|
|
|
elif length == 4:
|
|
|
|
|
if not spl[1] in main.network.keys():
|
|
|
|
|
failure("Network does not exist: %s" % spl[1])
|
|
|
|
|
return
|
|
|
|
|