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 twisted.python import log
|
||||||
from os.path import curdir, join as pjoin
|
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 = []
|
clients = []
|
||||||
talking = None
|
talking = None
|
||||||
|
@ -51,8 +54,13 @@ class FRNCrosslinkClient(FRNClient):
|
||||||
cl = []
|
cl = []
|
||||||
cl.append("[%s@%s:%d]" % (u.NT,server,port))
|
cl.append("[%s@%s:%d]" % (u.NT,server,port))
|
||||||
for c in factory.connection.clients:
|
for c in factory.connection.clients:
|
||||||
cl.append("(%s)" % (c['on'],))
|
cl.append("(%s%s%s %s)" % (
|
||||||
reply = ' '.join(cl)
|
cType.get(c['bc'], 'G'),
|
||||||
|
cStatus.get(c['s'], '?'),
|
||||||
|
cMute.get(c['m'], '?'),
|
||||||
|
c['on'],
|
||||||
|
))
|
||||||
|
reply = '<br>'.join(cl)
|
||||||
self.sendTextMessage(client, reply)
|
self.sendTextMessage(client, reply)
|
||||||
|
|
||||||
def decodeTX(self, my_id):
|
def decodeTX(self, my_id):
|
||||||
|
|
Loading…
Reference in New Issue