Add sender name to messages forwarded through crosslink
This commit is contained in:
parent
db078c6e0d
commit
0625631aae
|
@ -7,4 +7,5 @@ sounds/*
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
*.shelve
|
*.shelve
|
||||||
dropin.cache
|
dropin.cache
|
||||||
twistd.pid
|
*.pid
|
||||||
|
*.log
|
||||||
|
|
|
@ -39,10 +39,11 @@ class FRNCrosslinkClient(FRNClient):
|
||||||
def textMessageReceived(self, client, message, target):
|
def textMessageReceived(self, client, message, target):
|
||||||
global clients
|
global clients
|
||||||
if target == 'A':
|
if target == 'A':
|
||||||
|
msg = "[%s] %s" % (self.getClientName(client), message)
|
||||||
if client != self.clientId:
|
if client != self.clientId:
|
||||||
for _, _, _, factory in clients:
|
for _, _, _, factory in clients:
|
||||||
if factory != self.factory:
|
if factory != self.factory:
|
||||||
factory.connection.sendTextMessage('', message)
|
factory.connection.sendTextMessage('', msg)
|
||||||
else:
|
else:
|
||||||
if message.startswith('!'):
|
if message.startswith('!'):
|
||||||
cmd = message[1:]
|
cmd = message[1:]
|
||||||
|
|
Loading…
Reference in New Issue