Commit 091474c6 authored by nanahira's avatar nanahira

show ip in roomlist

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