diff options
| author | 2019-10-11 15:58:47 +0100 | |
|---|---|---|
| committer | 2019-10-11 15:58:47 +0100 | |
| commit | 85a8ddf2d194dd519a8134d7404d939742e62c67 (patch) | |
| tree | 2ad41e28cb9456a41c1073034c3f4fc3119b713e /src | |
| parent | actually send rehash command (diff) | |
| signature | ||
kill bitbotctl connection after rehash
Diffstat (limited to 'src')
| -rw-r--r-- | src/Control.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Control.py b/src/Control.py index b68bbddc..5b59bfec 100644 --- a/src/Control.py +++ b/src/Control.py @@ -87,14 +87,21 @@ class Control(PollSource.PollSource): response_action = "ack" response_data = None + keepalive = True + if command == "version": client.version = int(data) elif command == "log": client.log_level = Logging.LEVELS[data.lower()] elif command == "rehash": + self._bot.log.info("Reloading config file") self._bot.config.load() + self._bot.log.info("Reloaded config file") + keepalive = False self._send_action(client, response_action, response_data, id) + if not keepalive: + client.disconnect() def _send_action(self, client: ControlClient, action: str, data: str, id: int=None): |
