|
@@ -4,9 +4,19 @@ |
|
|
|
|
|
|
|
|
from irc.commands import test, help, git, link, chanops |
|
|
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): |
|
|
def check(connection, data, hook): |
|
|
data.parse_args() # parse command arguments into data.command and data.args |
|
|
data.parse_args() # parse command arguments into data.command and data.args |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if hook == "join": |
|
|
if hook == "join": |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
@@ -19,10 +29,10 @@ def check(connection, data, hook): |
|
|
if hook == "msg": |
|
|
if hook == "msg": |
|
|
if data.command == "!test": |
|
|
if data.command == "!test": |
|
|
test.call(connection, data) |
|
|
test.call(connection, data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif data.command == "!help": |
|
|
elif data.command == "!help": |
|
|
help.call(connection, data) |
|
|
help.call(connection, data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif data.command == "!git": |
|
|
elif data.command == "!git": |
|
|
git.call(connection, data) |
|
|
git.call(connection, data) |
|
|
|
|
|
|
|
|