diff options
author | Dico200 <dico.karssiens@gmail.com> | 2015-04-08 22:32:14 +0200 |
---|---|---|
committer | Dico200 <dico.karssiens@gmail.com> | 2015-04-08 22:32:14 +0200 |
commit | 201c76611911de2c5ae0afb2171dfd540de2d012 (patch) | |
tree | e36f4a87a7f7a6eafaec68a8b4c5127b95d5fbe0 /basecommands.py | |
parent | f7abc20ca13f6fbb637461d7a9e9bf71eb631703 (diff) |
Change to /modules... trying to make @command work.
@command throws an error when it tries to access current_subs, which
supposedly didn't exist. current_subs stores all subcommands found when
defining the method which @command was added to. (These SHOULD be called
first)
Diffstat (limited to 'basecommands.py')
-rw-r--r-- | basecommands.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/basecommands.py b/basecommands.py index 3f113bc..b88731f 100644 --- a/basecommands.py +++ b/basecommands.py @@ -7,7 +7,6 @@ current_main = None to_see_permission = "utils.showpermission" # See cmd permission in help def maincommand(function): - global current_main current_main = function return function @@ -37,7 +36,6 @@ class subcommand(): self.call = None def __call__(self, f): - global current_subs def call_sub(sender, command, label, args): isPlayer = is_player(sender) if not isSenderValid(senderLimit, isPlayer): @@ -85,7 +83,6 @@ def command(cmd, cmd = cmd.lower() - global curent_subs subcommands = [] for subcmd in current_subs: subcmd.setParent(cmd) @@ -93,7 +90,6 @@ def command(cmd, info(subcommands) current_subs = [] - global current_main main_function = current_main current_main = None if main_function == None and len(subcommands) != 0: |