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