Add sender name to messages forwarded through crosslink

This commit is contained in:
Maurizio Porrato 2010-08-28 20:34:43 +02:00
rodič db078c6e0d
revize 0625631aae
2 změnil soubory, kde provedl 4 přidání a 2 odebrání

3
.gitignore vendorováno
Zobrazit soubor

@ -7,4 +7,5 @@ sounds/*
*.sqlite3
*.shelve
dropin.cache
twistd.pid
*.pid
*.log

Zobrazit soubor

@ -39,10 +39,11 @@ class FRNCrosslinkClient(FRNClient):
def textMessageReceived(self, client, message, target):
global clients
if target == 'A':
msg = "[%s] %s" % (self.getClientName(client), message)
if client != self.clientId:
for _, _, _, factory in clients:
if factory != self.factory:
factory.connection.sendTextMessage('', message)
factory.connection.sendTextMessage('', msg)
else:
if message.startswith('!'):
cmd = message[1:]