plugin loader, graceful shutdown!

This commit is contained in:
Luke Rogers 2013-10-02 19:25:16 +13:00
parent 9d0f9248ff
commit e6318fe725
7 changed files with 136 additions and 133 deletions

View file

@ -176,7 +176,7 @@ def main(bot, conn, out):
command = match_command(bot, trigger)
if isinstance(command, list): # multiple potential matches
input = Input(conn, *out)
input = Input(bot, conn, *out)
input.notice("Did you mean {} or {}?".format
(', '.join(command[:-1]), command[-1]))
elif command in bot.commands:
@ -192,7 +192,7 @@ def main(bot, conn, out):
for func, args in bot.plugins['regex']:
m = args['re'].search(inp.lastparam)
if m:
input = Input(conn, *out)
input = Input(bot, conn, *out)
input.inp = m
dispatch(input, "regex", func, args)