|
|
@@ -4,9 +4,19 @@ |
|
|
|
|
|
|
|
from irc.commands import test, help, git, link, chanops |
|
|
|
|
|
|
|
def get_alias(key): |
|
|
|
"""used by help.py, e.g. so we know !voice corresponds to chanops.py""" |
|
|
|
aliases = { |
|
|
|
"voice": chanops, |
|
|
|
"devoice": chanops, |
|
|
|
"op": chanops, |
|
|
|
"deop": chanops, |
|
|
|
} |
|
|
|
return aliases[key] |
|
|
|
|
|
|
|
def check(connection, data, hook): |
|
|
|
data.parse_args() # parse command arguments into data.command and data.args |
|
|
|
|
|
|
|
|
|
|
|
if hook == "join": |
|
|
|
pass |
|
|
|
|
|
|
@@ -19,10 +29,10 @@ def check(connection, data, hook): |
|
|
|
if hook == "msg": |
|
|
|
if data.command == "!test": |
|
|
|
test.call(connection, data) |
|
|
|
|
|
|
|
|
|
|
|
elif data.command == "!help": |
|
|
|
help.call(connection, data) |
|
|
|
|
|
|
|
|
|
|
|
elif data.command == "!git": |
|
|
|
git.call(connection, data) |
|
|
|
|
|
|
|