Commit 091474c6 authored by nanahira's avatar nanahira

show ip in roomlist

parent 973bdb64
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
"deck_path": "./decks/", "deck_path": "./decks/",
"replay_safe": true, "replay_safe": true,
"replay_path": "./replays/", "replay_path": "./replays/",
"show_ip": false;
"duel_log": [], "duel_log": [],
"password": "123456", "password": "123456",
"port": 7933 "port": 7933
...@@ -158,6 +159,7 @@ ...@@ -158,6 +159,7 @@
"password": "123456", "password": "123456",
"websocket_roomlist": false, "websocket_roomlist": false,
"public_roomlist": false, "public_roomlist": false,
"show_ip": false;
"ssl": { "ssl": {
"enabled": false, "enabled": false,
"port": 7923, "port": 7923,
......
...@@ -24,10 +24,14 @@ ...@@ -24,10 +24,14 @@
results = []; results = [];
for (i = 0, len = ref.length; i < len; i++) { for (i = 0, len = ref.length; i < len; i++) {
client = ref[i]; client = ref[i];
results.push({ var push_data = {
username: client.name, username: client.name,
position: client.pos position: client.pos
}); },
if (settings.modules.http.show_ip) {
push_data.username = client.name + " (" + client.ip + ")";
}
results.push(push_data);
} }
return results; return results;
})(), })(),
......
...@@ -2358,10 +2358,14 @@ ...@@ -2358,10 +2358,14 @@
results = []; results = [];
for (k = 0, len1 = ref1.length; k < len1; k++) { for (k = 0, len1 = ref1.length; k < len1; k++) {
player = ref1[k]; player = ref1[k];
results.push({ var push_data = {
name: player.name, username: client.name,
winner: player.pos === room.winner position: client.pos
}); },
if (settings.modules.tournament_mode.show_ip) {
push_data.username = client.name + " (" + client.ip + ")";
}
results.push(push_data);
} }
return results; return results;
})() })()
......
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