Browse Source

Add sender name to messages forwarded through crosslink

Maurizio Porrato 8 years ago
parent
commit
0625631aae
2 changed files with 4 additions and 2 deletions
  1. 2
    1
      .gitignore
  2. 2
    1
      twisted/plugins/frncrosslink.py

+ 2
- 1
.gitignore View File

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

+ 2
- 1
twisted/plugins/frncrosslink.py View File

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

Loading…
Cancel
Save