Mercurial > xib
changeset 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 | 3f299ad4d452 |
children | 73b6c8d20da7 |
files | commands.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
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.'