Mercurial > xib
diff commands.py @ 157:ce0eb3e969a7
added a stop-bot command
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Tue, 19 Jan 2010 07:43:26 +0100 |
parents | 63db565438bd |
children | 266a6afb6b79 |
line wrap: on
line diff
--- a/commands.py +++ b/commands.py @@ -26,7 +26,7 @@ from bridge import Bridge commands = ['xmpp-participants', 'irc-participants', 'xmpp-connections', 'irc-connections', 'connections', 'bridges'] -admin_commands = ['add-bridge', 'add-xmpp-admin', 'change-bridge-mode', 'debug', 'halt', 'remove-bridge', 'restart-bot', 'restart-bridge', 'stop-bridge'] +admin_commands = ['add-bridge', 'add-xmpp-admin', 'change-bridge-mode', 'debug', 'halt', 'remove-bridge', 'restart-bot', 'restart-bridge', 'stop-bot', 'stop-bridge'] def execute(bot, command_line, bot_admin, bridge): ret = '' @@ -227,6 +227,11 @@ def restart_bridge(bot, command, args_ar return 'Bridge restarted.' +def stop_bot(bot, command, args_array, bot_admin, bridge): + bot.stop() + return 'Bot stopped.' + + def stop_bridge(bot, command, args_array, bot_admin, bridge): bridge.stop() return 'Bridge stopped.'