# HG changeset patch # User Charly COSTE # Date 1263883406 -3600 # Node ID ce0eb3e969a7c9c3e88865fb2e1e8f57593c1a04 # Parent 3f299ad4d45285924c1b33ea583db8ec858e599e added a stop-bot command Signed-off-by: Charly COSTE diff --git a/commands.py b/commands.py --- 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.'