Fix more regressions
This commit is contained in:
rodzic
17eb5f0ca3
commit
8def852a98
|
@ -182,7 +182,6 @@ class FRNManagerServer(LineOnlyReceiver):
|
|||
('SV', versions.server),
|
||||
('CV', versions.client),
|
||||
('MC', versions.manager),
|
||||
# ('AL', res['al']),
|
||||
('AL', res),
|
||||
('KP', self.kp)
|
||||
]))
|
||||
|
|
12
parrot.py
12
parrot.py
|
@ -27,7 +27,7 @@ class FRNParrot(FRNClient):
|
|||
|
||||
def getClientName(self, client_id):
|
||||
if self.clientsById.has_key(client_id):
|
||||
return self.clientsById[client_id]['on']
|
||||
return self.clientsById[client_id]['ON']
|
||||
else:
|
||||
return client_id
|
||||
|
||||
|
@ -64,11 +64,11 @@ class FRNParrot(FRNClient):
|
|||
|
||||
def startRepeating(self, from_id):
|
||||
log.msg("%s stopped talking: starting playback." %
|
||||
self.clients[from_id-1]['on'])
|
||||
self.clients[from_id-1]['ON'])
|
||||
self.startStreaming()
|
||||
|
||||
def audioFrameReceived(self, from_id, frames):
|
||||
recname = sanitizeFilename(self.clients[from_id-1]['on'])
|
||||
recname = sanitizeFilename(self.clients[from_id-1]['ON'])
|
||||
with file('recordings/%s.gsm' % recname, 'ab') as f:
|
||||
f.write(frames)
|
||||
self.feedStreaming(frames)
|
||||
|
@ -76,17 +76,17 @@ class FRNParrot(FRNClient):
|
|||
self.parrot_timer.reset(PARROT_AUDIO_DELAY)
|
||||
except:
|
||||
log.msg("%s started talking" %
|
||||
self.clients[from_id-1]['on'])
|
||||
self.clients[from_id-1]['ON'])
|
||||
self.parrot_timer = self.factory.reactor.callLater(
|
||||
PARROT_AUDIO_DELAY, self.startRepeating, from_id)
|
||||
self.pong()
|
||||
|
||||
def loginResponse(self, info):
|
||||
log.msg("Login: %s" % info['al'])
|
||||
log.msg("Login: %s" % info['AL'])
|
||||
|
||||
def clientsListUpdated(self, clients):
|
||||
self.clients = clients
|
||||
self.clientsById = dict([(i['id'], i) for i in clients])
|
||||
self.clientsById = dict([(i['ID'], i) for i in clients])
|
||||
|
||||
|
||||
class FRNParrotFactory(FRNClientFactory):
|
||||
|
|
|
@ -110,7 +110,7 @@ class FRNCrosslinkClient(FRNClient):
|
|||
for _, _, _, factory in clients:
|
||||
conn = factory.connection
|
||||
if conn != self:
|
||||
role = conn.serverdata.get('al', None)
|
||||
role = conn.serverdata.get('AL', None)
|
||||
if role in ['OK', 'ADMIN', 'OWNER']:
|
||||
if conn.txOk:
|
||||
conn.txReq = False
|
||||
|
|
Ładowanie…
Reference in New Issue