]> git.0d.be Git - botaradio.git/blobdiff - command.py
also accept files according to their extension
[botaradio.git] / command.py
index 5022088999d6f1dacbfd670365f2520836f33120..28c38d85c45e1ce5148dc3f693e2d6758ea5b4cf 100644 (file)
@@ -77,7 +77,8 @@ def send_multi_lines(bot, lines, text, linebreak="<br />"):
     for newline in lines:
         msg += br
         br = linebreak
-        if (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4) != 0:  # 4 == len("<br>")
+        if bot.mumble.get_max_message_length()\
+                    and (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4):  # 4 == len("<br>")
             bot.send_msg(msg, text)
             msg = ""
         msg += newline
@@ -176,7 +177,10 @@ def cmd_play(bot, user, text, command, parameter):
                 # the one you want
                 var.playlist.point_to(int(parameter) - 1 - 1)
 
-                bot.interrupt()
+                if not bot.is_pause:
+                    bot.interrupt()
+                else:
+                    bot.is_pause = False
             else:
                 bot.send_msg(constants.strings('invalid_index', index=parameter), text)