From 7400d0c4d355eac370c63b7b9722f6474d7199ec Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Fri, 24 Mar 2023 17:01:20 +0900 Subject: [PATCH] Apply same solution for `slave.js`. --- Server/lib/Game/slave.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/lib/Game/slave.js b/Server/lib/Game/slave.js index b3624a38e..3f3dd9188 100644 --- a/Server/lib/Game/slave.js +++ b/Server/lib/Game/slave.js @@ -137,7 +137,7 @@ Server.on('connection', function(socket, info){ $c.remoteAddress = GLOBAL.USER_BLOCK_OPTIONS.USE_X_FORWARDED_FOR ? info.connection.remoteAddress : (info.headers['x-forwarded-for'] || info.connection.remoteAddress); if(GLOBAL.USER_BLOCK_OPTIONS.USE_MODULE && ((GLOBAL.USER_BLOCK_OPTIONS.BLOCK_IP_ONLY_FOR_GUEST && $c.guest) || !GLOBAL.USER_BLOCK_OPTIONS.BLOCK_IP_ONLY_FOR_GUEST)){ MainDB.ip_block.findOne([ '_id', $c.remoteAddress ]).on(function($body){ - if ($body.reasonBlocked) { + if ($body && $body.reasonBlocked) { $c.socket.send(JSON.stringify({ type: 'error', code: 446,