Enhance formatting of client list returned by crosslink
This commit is contained in:
parent
88b98baffd
commit
aad317b0da
|
@ -15,6 +15,9 @@ from frn.user import FRNUser
|
|||
from twisted.python import log
|
||||
from os.path import curdir, join as pjoin
|
||||
|
||||
cType = {'PC Only': 'O', 'Crosslink': 'C', 'Parrot': 'P'}
|
||||
cStatus = {'0': 'A', '1': 'N', '2': 'X'}
|
||||
cMute = {'0': ' ', '1': 'M'}
|
||||
|
||||
clients = []
|
||||
talking = None
|
||||
|
@ -51,8 +54,13 @@ class FRNCrosslinkClient(FRNClient):
|
|||
cl = []
|
||||
cl.append("[%s@%s:%d]" % (u.NT,server,port))
|
||||
for c in factory.connection.clients:
|
||||
cl.append("(%s)" % (c['on'],))
|
||||
reply = ' '.join(cl)
|
||||
cl.append("(%s%s%s %s)" % (
|
||||
cType.get(c['bc'], 'G'),
|
||||
cStatus.get(c['s'], '?'),
|
||||
cMute.get(c['m'], '?'),
|
||||
c['on'],
|
||||
))
|
||||
reply = '<br>'.join(cl)
|
||||
self.sendTextMessage(client, reply)
|
||||
|
||||
def decodeTX(self, my_id):
|
||||
|
|
Loading…
Reference in New Issue