Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Only fetch changelog, when auto-updates are enabled
Browse files Browse the repository at this point in the history
Fixes: #268
  • Loading branch information
mweinelt committed May 16, 2021
1 parent f36611f commit 849a0a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configuration.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ port = 64738
# 'download_attempts': how many times the bot will try to download an item
#download_attempts = 2

# 'auto_check_update': check for updates every time the bot starts
# 'auto_check_update': check for updates every time the bot starts, post the changelog after an update was applied
#auto_check_update = True
#pip3_path = venv/bin/pip

Expand Down
5 changes: 3 additions & 2 deletions mumbleBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ def check_update():
last_startup_version = var.db.get("bot", "version", fallback=None)
if not last_startup_version or version.parse(last_startup_version) < version.parse(self.version):
var.db.set("bot", "version", self.version)
changelog = util.fetch_changelog()
self.send_channel_msg(tr("update_successful", version=self.version, changelog=changelog))
if var.config.getboolean("bot", "auto_check_update"):
changelog = util.fetch_changelog()
self.send_channel_msg(tr("update_successful", version=self.version, changelog=changelog))

# Set the CTRL+C shortcut
def ctrl_caught(self, signal, frame):
Expand Down

0 comments on commit 849a0a0

Please sign in to comment.