This commit is contained in:
Fabian Würfl 2018-05-18 17:46:21 +02:00
parent ad378a586c
commit 4ae9c1cdb7
3 changed files with 8 additions and 9 deletions

View File

@ -1,8 +1,8 @@
[bot]
comment = Coucou, Je suis née du savoir du Azlux, accès au https://azlux.fr/bot
volume = 0.1
admin = Azlux;AzMobile
music_folder = /home/dmichel/botamusique/music/
admin = BafTac
music_folder = /home/fabian/music/mumblebot/
tmp_folder = /tmp/
is_proxified = True

View File

@ -113,4 +113,4 @@ def download():
if __name__ == '__main__':
web.run(port=8181, host="0.0.0.0")
web.run(port=8181, host="127.0.0.1")

View File

@ -109,11 +109,10 @@ class MumbleBot:
print(command + ' - ' + parameter + ' by ' + self.mumble.users[text.actor]['name'])
if command == self.config.get('command', 'play_file') and parameter:
path = self.config.get('bot', 'music_folder') + parameter
if "/" in parameter:
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_file'))
elif os.path.isfile(path):
var.playlist.append(["file", path])
music_folder = self.config.get('bot', 'music_folder')
path = os.path.abspath(os.path.join(music_folder, parameter))
if path.startswith(music_folder) and os.path.isfile(path):
self.launch_play_file(path)
else:
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_file'))
@ -275,7 +274,7 @@ class MumbleBot:
def start_web_interface():
interface.web.run(port=8181, host="0.0.0.0")
interface.web.run(port=8181, host="127.0.0.1")
if __name__ == '__main__':