From b8109f2f4006d2f50515390adceb32091d9059d3 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 2 May 2013 16:44:15 -0700 Subject: [PATCH] Don't duplicate PMs sent to yourself --- chat-commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat-commands.js b/chat-commands.js index 2add3f0b0e..1a87642643 100644 --- a/chat-commands.js +++ b/chat-commands.js @@ -435,7 +435,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) { message: targets[1] }; user.emit('console', message); - targets[0].emit('console', message); + if (targets[0] !== user) targets[0].emit('console', message); targets[0].lastPM = user.userid; user.lastPM = targets[0].userid; return false;