Merge branch 'command_class' into aliasgen
This commit is contained in:
commit
f6657cb905
|
@ -2,7 +2,7 @@ import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
import modules.alias as alias
|
import modules.alias as alias
|
||||||
|
|
||||||
class Alias:
|
class AliasCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.alias(*args)
|
self.alias(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
import modules.userinfo as userinfo
|
import modules.userinfo as userinfo
|
||||||
|
|
||||||
class Chans:
|
class ChansCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.chans(*args)
|
self.chans(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from core.bot import deliverRelayCommands
|
from core.bot import deliverRelayCommands
|
||||||
|
|
||||||
class Cmd:
|
class CmdCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.cmd(*args)
|
self.cmd(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Del:
|
class DelCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.delete(*args)
|
self.delete(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from core.bot import deliverRelayCommands
|
from core.bot import deliverRelayCommands
|
||||||
|
|
||||||
class Disable:
|
class DisableCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.disable(*args)
|
self.disable(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from subprocess import run, PIPE
|
from subprocess import run, PIPE
|
||||||
|
|
||||||
class Dist:
|
class DistCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.dist(*args)
|
self.dist(*args)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import main
|
||||||
from core.helper import startBot
|
from core.helper import startBot
|
||||||
from core.bot import deliverRelayCommands
|
from core.bot import deliverRelayCommands
|
||||||
|
|
||||||
class Enable:
|
class EnableCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.enable(*args)
|
self.enable(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Get:
|
class GetCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.get(*args)
|
self.get(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Help:
|
class HelpCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.help(*args)
|
self.help(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Join:
|
class JoinCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.join(*args)
|
self.join(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
|
|
||||||
class List:
|
class ListCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.list(*args)
|
self.list(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Load:
|
class LoadCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.load(*args)
|
self.load(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from utils.loaders.single_loader import loadSingle
|
from utils.loaders.single_loader import loadSingle
|
||||||
|
|
||||||
class Loadmod:
|
class LoadmodCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.loadmod(*args)
|
self.loadmod(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Logout:
|
class LogoutCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.logout(*args)
|
self.logout(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
|
|
||||||
class Mod:
|
class ModCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.mod(*args)
|
self.mod(*args)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import sys
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
|
|
||||||
class Mon:
|
class MonCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.mon(*args)
|
self.mon(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Msg:
|
class MsgCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.msg(*args)
|
self.msg(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
|
|
||||||
class Network:
|
class NetworkCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.network(*args)
|
self.network(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Part:
|
class PartCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.part(*args)
|
self.part(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Pass:
|
class PassCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.password(*args)
|
self.password(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from modules import provision
|
from modules import provision
|
||||||
|
|
||||||
class Provision:
|
class ProvisionCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.provision(*args)
|
self.provision(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
|
|
||||||
class Relay:
|
class RelayCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.relay(*args)
|
self.relay(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import main
|
import main
|
||||||
|
|
||||||
class Save:
|
class SaveCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.save(*args)
|
self.save(*args)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import modules.counters as count
|
||||||
import modules.userinfo as userinfo
|
import modules.userinfo as userinfo
|
||||||
from string import digits
|
from string import digits
|
||||||
|
|
||||||
class Stats:
|
class StatsCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.stats(*args)
|
self.stats(*args)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import main
|
||||||
from yaml import dump
|
from yaml import dump
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
class Token:
|
class TokenCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.token(*args)
|
self.token(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
import modules.userinfo as userinfo
|
import modules.userinfo as userinfo
|
||||||
|
|
||||||
class Users:
|
class UsersCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.users(*args)
|
self.users(*args)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import main
|
import main
|
||||||
import modules.userinfo as userinfo
|
import modules.userinfo as userinfo
|
||||||
|
|
||||||
class Who:
|
class WhoCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self.who(*args)
|
self.who(*args)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ def loadCommands():
|
||||||
for filename in listdir("commands"):
|
for filename in listdir("commands"):
|
||||||
if filename.endswith(".py") and filename != "__init__.py":
|
if filename.endswith(".py") and filename != "__init__.py":
|
||||||
commandName = filename[0:-3]
|
commandName = filename[0:-3]
|
||||||
className = commandName.capitalize()
|
className = commandName.capitalize()+"Command"
|
||||||
try:
|
try:
|
||||||
module = __import__('commands.%s' % commandName)
|
module = __import__('commands.%s' % commandName)
|
||||||
if not commandName in CommandMap:
|
if not commandName in CommandMap:
|
||||||
|
|
Loading…
Reference in New Issue