Commit 5fa4d7b2 authored by mercury233's avatar mercury233

update

parent 03fa19c8
...@@ -824,7 +824,7 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)-> ...@@ -824,7 +824,7 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)->
buffer = struct.buffer buffer = struct.buffer
client.name = name client.name = name
if not settings.modules.i18n.auto_pick if not settings.modules.i18n.auto_pick or client.ip=="::ffff:127.0.0.1"
client.lang=settings.modules.i18n.default client.lang=settings.modules.i18n.default
else else
geo = geoip.lookup(client.ip) geo = geoip.lookup(client.ip)
...@@ -835,7 +835,7 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)-> ...@@ -835,7 +835,7 @@ ygopro.ctos_follow 'PLAYER_INFO', true, (buffer, info, client, server)->
if lang=settings.modules.i18n.map[geo.country] if lang=settings.modules.i18n.map[geo.country]
client.lang=lang client.lang=lang
else else
log.info("TMP: not in china", client.ip) log.info("Not in map", client.ip)
client.lang=settings.modules.i18n.fallback client.lang=settings.modules.i18n.fallback
return false return false
......
...@@ -1039,7 +1039,7 @@ ...@@ -1039,7 +1039,7 @@
struct.set("name", name); struct.set("name", name);
buffer = struct.buffer; buffer = struct.buffer;
client.name = name; client.name = name;
if (!settings.modules.i18n.auto_pick) { if (!settings.modules.i18n.auto_pick || client.ip === "::ffff:127.0.0.1") {
client.lang = settings.modules.i18n["default"]; client.lang = settings.modules.i18n["default"];
} else { } else {
geo = geoip.lookup(client.ip); geo = geoip.lookup(client.ip);
...@@ -1050,7 +1050,7 @@ ...@@ -1050,7 +1050,7 @@
if (lang = settings.modules.i18n.map[geo.country]) { if (lang = settings.modules.i18n.map[geo.country]) {
client.lang = lang; client.lang = lang;
} else { } else {
log.info("TMP: not in china", client.ip); log.info("Not in map", client.ip);
client.lang = settings.modules.i18n.fallback; client.lang = settings.modules.i18n.fallback;
} }
} }
......
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