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

Store volume in the config file, write the config file, fixes #22

Merged
merged 4 commits into from
Jun 21, 2018
Merged

Store volume in the config file, write the config file, fixes #22

merged 4 commits into from
Jun 21, 2018

Conversation

Lartza
Copy link
Contributor

@Lartza Lartza commented Jun 19, 2018

Fixes commands failing because of repeat missing from the config.

Fixes bot startup without specifying --user

Implements a function to write the configuration file on exit, stores the volume to the config when it is changed.

@Lartza Lartza mentioned this pull request Jun 21, 2018
@@ -184,6 +184,7 @@ def message_received(self, text):
self.volume = float(float(parameter) / 100)
self.send_msg_channel(var.config.get('strings', 'change_volume') % (
int(self.volume * 100), self.mumble.users[text.actor]['name']))
var.config.set('bot', 'volume', str(self.volume))
Copy link
Owner

@azlux azlux Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one. You can have the "jerks people" who set the bot volume at 100%.

Copy link
Contributor Author

@Lartza Lartza Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still !v 100 though, this doesn't really enable it any easier. Personally I've not had a problem on my server and having to set the bot volume again each restart even if restarts are far apart seems to me more annoying long term.

EDIT: Of course you could make this an option, but that does sound kind of redundant to me if anyone is able to change the volume anyways. Should I make a config option for a max volume the bot will ever refuse to go realtime or config?
EDIT2: Also isn't this kind of solved through user ignoring that I suggested ;) Also fyi I am kind of going through a family emergency for a few days so I may not be responding that quickly if at all for a few days here

@azlux azlux merged commit d5dcd13 into azlux:master Jun 21, 2018
@azlux azlux mentioned this pull request Jun 26, 2018
@Lartza Lartza deleted the store-volume branch June 27, 2018 06:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants