mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-11 06:07:53 +00:00
[irc] no exception when the user does not have a file
This commit is contained in:
parent
e4c57e6e97
commit
5a44c46e50
@ -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) + '<Paused>' + chr(15) if paused else chr(2) + '<Playing>' + 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
|
||||
|
Loading…
Reference in New Issue
Block a user