Prevent chat event if client is not logged in server

This commit is contained in:
AlexKvazos
2015-04-29 23:39:19 -05:00
parent 341b6973cd
commit a8a64e3e44
+1 -1
View File
@@ -1,7 +1,7 @@
module.exports = function(socket) {
socket.on('chat', function(data) {
if (socket.mcbot) {
if (socket.mcbot && socket.mcbot.entity) {
socket.mcbot.chat(data.message);
}
});