mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-11 06:07:53 +00:00
[irc] fix stuff
This commit is contained in:
parent
ac02d581b7
commit
0902154cef
@ -124,7 +124,14 @@ class Bot(object):
|
|||||||
users = self.functions[4](room)
|
users = self.functions[4](room)
|
||||||
paused = self.functions[5](room)
|
paused = self.functions[5](room)
|
||||||
out = chr(2) + '<Paused>' + chr(15) if paused else chr(2) + '<Playing>' + chr(15)
|
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']) + '] '
|
time = self.functions[2](room)
|
||||||
|
if time == None: time = 0
|
||||||
|
for u in users:
|
||||||
|
if u['length'] == None: continue
|
||||||
|
out += ' [' + time + '/' + utils.formatTime(u['length']) + '] '
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
out += ' '
|
||||||
|
|
||||||
for u in users:
|
for u in users:
|
||||||
if u['file'] == None: continue
|
if u['file'] == None: continue
|
||||||
@ -153,7 +160,7 @@ class Bot(object):
|
|||||||
users = self.functions[4](room)
|
users = self.functions[4](room)
|
||||||
for u in users:
|
for u in users:
|
||||||
if u['nick'] == nickFrom:
|
if u['nick'] == nickFrom:
|
||||||
self.functions[6](nickFrom, True)
|
self.functions[5](nickFrom, True)
|
||||||
return
|
return
|
||||||
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
|
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
|
||||||
elif split[0].lower() == '!play':
|
elif split[0].lower() == '!play':
|
||||||
@ -163,7 +170,7 @@ class Bot(object):
|
|||||||
users = self.functions[4](room)
|
users = self.functions[4](room)
|
||||||
for u in users:
|
for u in users:
|
||||||
if u['nick'] == nickFrom:
|
if u['nick'] == nickFrom:
|
||||||
self.functions[6](nickFrom, False)
|
self.functions[5](nickFrom, False)
|
||||||
return
|
return
|
||||||
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
|
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
|
||||||
elif split[0].lower() == '!help':
|
elif split[0].lower() == '!help':
|
||||||
|
Loading…
Reference in New Issue
Block a user