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();