wip
This commit is contained in:
parent
ad378a586c
commit
4ae9c1cdb7
@ -1,8 +1,8 @@
|
|||||||
[bot]
|
[bot]
|
||||||
comment = Coucou, Je suis née du savoir du Azlux, accès au https://azlux.fr/bot
|
comment = Coucou, Je suis née du savoir du Azlux, accès au https://azlux.fr/bot
|
||||||
volume = 0.1
|
volume = 0.1
|
||||||
admin = Azlux;AzMobile
|
admin = BafTac
|
||||||
music_folder = /home/dmichel/botamusique/music/
|
music_folder = /home/fabian/music/mumblebot/
|
||||||
tmp_folder = /tmp/
|
tmp_folder = /tmp/
|
||||||
is_proxified = True
|
is_proxified = True
|
||||||
|
|
||||||
|
@ -113,4 +113,4 @@ def download():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
web.run(port=8181, host="0.0.0.0")
|
web.run(port=8181, host="127.0.0.1")
|
||||||
|
11
mumbleBot.py
11
mumbleBot.py
@ -109,11 +109,10 @@ class MumbleBot:
|
|||||||
print(command + ' - ' + parameter + ' by ' + self.mumble.users[text.actor]['name'])
|
print(command + ' - ' + parameter + ' by ' + self.mumble.users[text.actor]['name'])
|
||||||
|
|
||||||
if command == self.config.get('command', 'play_file') and parameter:
|
if command == self.config.get('command', 'play_file') and parameter:
|
||||||
path = self.config.get('bot', 'music_folder') + parameter
|
music_folder = self.config.get('bot', 'music_folder')
|
||||||
if "/" in parameter:
|
path = os.path.abspath(os.path.join(music_folder, parameter))
|
||||||
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_file'))
|
if path.startswith(music_folder) and os.path.isfile(path):
|
||||||
elif os.path.isfile(path):
|
self.launch_play_file(path)
|
||||||
var.playlist.append(["file", path])
|
|
||||||
else:
|
else:
|
||||||
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_file'))
|
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_file'))
|
||||||
|
|
||||||
@ -275,7 +274,7 @@ class MumbleBot:
|
|||||||
|
|
||||||
|
|
||||||
def start_web_interface():
|
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__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user