From 0c9099e7665323028ccfad64ea1f70830c7924e5 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Wed, 21 May 2014 20:07:04 -0700 Subject: [PATCH] Fix #362 --- lib/channel/chat.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/channel/chat.js b/lib/channel/chat.js index 40ab4ced..c1bdbb21 100644 --- a/lib/channel/chat.js +++ b/lib/channel/chat.js @@ -139,6 +139,12 @@ ChatModule.prototype.handlePm = function (user, data) { return; } + if (!user.is(Flags.U_LOGGED_IN)) { + return user.socket.emit("errorMsg", { + msg: "You must be signed in to send PMs" + }); + } + var reallyTo = data.to; data.to = data.to.toLowerCase();