Reply if query is empty

This commit is contained in:
elpatron68 2019-07-27 21:39:08 +02:00
parent 23b10a05f7
commit e9a46a14f8

View File

@ -374,6 +374,9 @@ class MumbleBot:
rb_stations = radiobrowser.getstations_byname(parameter)
msg = var.config.get('strings', 'rbqueryresult') + " :"
msg += '\n<table><tr><th>ID</th><th>Station Name</th></tr>'
if not rb_stations:
self.send_msg('No results for ' + parameter, text)
else:
for s in rb_stations:
msg += '<tr><td>' + s['id'] + '</td><td>' + s['stationname'] + '</td></tr>'
msg += '</table>'