Rename classes representing commands to <CommandName>Command

This commit is contained in:
Al Beano 2019-08-09 23:06:34 +01:00
parent 56840e0060
commit 88077782f3
28 changed files with 28 additions and 28 deletions

View File

@ -1,7 +1,7 @@
import main import main
from yaml import dump from yaml import dump
class Alias: class AliasCommand:
def __init__(self, *args): def __init__(self, *args):
self.alias(*args) self.alias(*args)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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: