Commit 2be5040b authored by mercury233's avatar mercury233

wtf fix

parent 0d34825e
...@@ -692,7 +692,7 @@ class Room ...@@ -692,7 +692,7 @@ class Room
# 网络连接 # 网络连接
net.createServer (client) -> net.createServer (client) ->
client.ip = client.remoteAddress client.ip = client.remoteAddress
client.is_local = client.ip.includes('127.0.0.1') or client.ip.includes(settings.modules.windbot.server_ip) client.is_local = client.ip and (client.ip.includes('127.0.0.1') or client.ip.includes(settings.modules.windbot.server_ip))
connect_count = ROOM_connected_ip[client.ip] or 0 connect_count = ROOM_connected_ip[client.ip] or 0
if !settings.modules.test_mode.no_connect_count_limit and !client.is_local if !settings.modules.test_mode.no_connect_count_limit and !client.is_local
......
...@@ -930,7 +930,7 @@ ...@@ -930,7 +930,7 @@
net.createServer(function(client) { net.createServer(function(client) {
var connect_count, server; var connect_count, server;
client.ip = client.remoteAddress; client.ip = client.remoteAddress;
client.is_local = client.ip.includes('127.0.0.1') || client.ip.includes(settings.modules.windbot.server_ip); client.is_local = client.ip && (client.ip.includes('127.0.0.1') || client.ip.includes(settings.modules.windbot.server_ip));
connect_count = ROOM_connected_ip[client.ip] || 0; connect_count = ROOM_connected_ip[client.ip] || 0;
if (!settings.modules.test_mode.no_connect_count_limit && !client.is_local) { if (!settings.modules.test_mode.no_connect_count_limit && !client.is_local) {
connect_count++; connect_count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment