From 0625631aae04e8078108a080b8e4822ad3871937 Mon Sep 17 00:00:00 2001 From: Maurizio Porrato Date: Sat, 28 Aug 2010 20:34:43 +0200 Subject: [PATCH] Add sender name to messages forwarded through crosslink --- .gitignore | 3 ++- twisted/plugins/frncrosslink.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dc0f772..f765324 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ sounds/* *.sqlite3 *.shelve dropin.cache -twistd.pid +*.pid +*.log diff --git a/twisted/plugins/frncrosslink.py b/twisted/plugins/frncrosslink.py index 85fbfd1..8563849 100755 --- a/twisted/plugins/frncrosslink.py +++ b/twisted/plugins/frncrosslink.py @@ -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:]