diff --git a/syncplay/ircBot.py b/syncplay/ircBot.py index f97e9b2..12cdb84 100644 --- a/syncplay/ircBot.py +++ b/syncplay/ircBot.py @@ -65,6 +65,8 @@ class Bot(object): def sp_paused(self, who, room): self.msg(self.channel, chr(2) + '<' + who + '>'+ chr(15) +' has paused (room ' + room + ')') def sp_fileplaying(self, who, filename, room): #for when syncplay knows what filename is being played + if filename == '': + return self.msg(self.channel, chr(2) + '<' + who + '>'+ chr(15) +' is playing "' + filename + '" (room ' + room + ')') def sp_seek(self, who, fromTime, toTime, room): self.msg(self.channel, chr(2) + '<' + who + '>'+ chr(15) +' has jumped from ' + utils.formatTime(fromTime) + ' to ' + utils.formatTime(toTime) +' (room ' + room + ')') @@ -122,7 +124,13 @@ class Bot(object): paused = self.functions[5](room) out = chr(2) + '' + chr(15) if paused else chr(2) + '' + chr(15) out += ' [' + utils.formatTime(self.functions[2](room)) + '/' + utils.formatTime(users[0]['length']) + '] ' - out += users[0]['file'] + + for u in users: + if u['file'] == None: continue + out += u['file'] + break + else: + out += '[no file]' self.msg(to, out) out = 'Users: ' i = 0