Commit f615cdd0 authored by mercury233's avatar mercury233

hide some logs

parent b709a506
...@@ -1096,7 +1096,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1096,7 +1096,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
ygopro.stoc_send_chat(client, settings.modules.welcome, ygopro.constants.COLORS.GREEN) ygopro.stoc_send_chat(client, settings.modules.welcome, ygopro.constants.COLORS.GREEN)
if room.welcome if room.welcome
ygopro.stoc_send_chat(client, room.welcome, ygopro.constants.COLORS.BABYBLUE) ygopro.stoc_send_chat(client, room.welcome, ygopro.constants.COLORS.BABYBLUE)
if settings.modules.arena_mode.enabled #and not client.score_shown if settings.modules.arena_mode.enabled and client.ip != '::ffff:127.0.0.1' #and not client.score_shown
request request
url: settings.modules.arena_mode.get_score + encodeURIComponent(client.name), url: settings.modules.arena_mode.get_score + encodeURIComponent(client.name),
json: true json: true
...@@ -1106,7 +1106,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1106,7 +1106,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
else if !body or _.isString body else if !body or _.isString body
log.warn 'LOAD SCORE FAIL', client.name, response.statusCode, response.statusMessage, body log.warn 'LOAD SCORE FAIL', client.name, response.statusCode, response.statusMessage, body
else else
log.info 'LOAD SCORE', client.name, body #log.info 'LOAD SCORE', client.name, body
rank_txt = if body.arena_rank>0 then "排名第" + body.arena_rank else "暂无排名" rank_txt = if body.arena_rank>0 then "排名第" + body.arena_rank else "暂无排名"
ygopro.stoc_send_chat(client, "#{client.name},你有#{body.exp}点经验,你的战斗力是#{Math.round(body.pt)}#{rank_txt}。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE) ygopro.stoc_send_chat(client, "#{client.name},你有#{body.exp}点经验,你的战斗力是#{Math.round(body.pt)}#{rank_txt}。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE)
#client.score_shown = true #client.score_shown = true
...@@ -1353,7 +1353,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)-> ...@@ -1353,7 +1353,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
ygopro.stoc_send_random_tip(client) ygopro.stoc_send_random_tip(client)
if settings.modules.deck_log.enabled and client.main and client.main.length and not client.deck_saved and client.ip != '::ffff:127.0.0.1' if settings.modules.deck_log.enabled and client.main and client.main.length and not client.deck_saved and client.ip != '::ffff:127.0.0.1'
deck_text = '#ygopro-server deck log\n#main\n' + client.main.join('\n') + '\n!side\n' + client.side.join('\n') + '\n' deck_text = '#ygopro-server deck log\n#main\n' + client.main.join('\n') + '\n!side\n' + client.side.join('\n') + '\n'
log.info "DECK LOG START", client.name, room.arena #log.info "DECK LOG START", client.name, room.arena
if settings.modules.deck_log.local if settings.modules.deck_log.local
deck_name = moment().format('YYYY-MM-DD HH-mm-ss') + ' ' + room.port + ' ' + client.pos + ' ' + client.name.replace(/\//g, '_') deck_name = moment().format('YYYY-MM-DD HH-mm-ss') + ' ' + room.port + ' ' + client.pos + ' ' + client.name.replace(/\//g, '_')
fs.writeFile settings.modules.deck_log.local + deck_name + '.ydk', deck_text, 'utf-8', (err) -> fs.writeFile settings.modules.deck_log.local + deck_name + '.ydk', deck_text, 'utf-8', (err) ->
......
...@@ -1333,7 +1333,7 @@ ...@@ -1333,7 +1333,7 @@
if (room.welcome) { if (room.welcome) {
ygopro.stoc_send_chat(client, room.welcome, ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, room.welcome, ygopro.constants.COLORS.BABYBLUE);
} }
if (settings.modules.arena_mode.enabled) { if (settings.modules.arena_mode.enabled && client.ip !== '::ffff:127.0.0.1') {
request({ request({
url: settings.modules.arena_mode.get_score + encodeURIComponent(client.name), url: settings.modules.arena_mode.get_score + encodeURIComponent(client.name),
json: true json: true
...@@ -1344,7 +1344,6 @@ ...@@ -1344,7 +1344,6 @@
} else if (!body || _.isString(body)) { } else if (!body || _.isString(body)) {
log.warn('LOAD SCORE FAIL', client.name, response.statusCode, response.statusMessage, body); log.warn('LOAD SCORE FAIL', client.name, response.statusCode, response.statusMessage, body);
} else { } else {
log.info('LOAD SCORE', client.name, body);
rank_txt = body.arena_rank > 0 ? "排名第" + body.arena_rank : "暂无排名"; rank_txt = body.arena_rank > 0 ? "排名第" + body.arena_rank : "暂无排名";
ygopro.stoc_send_chat(client, client.name + ",你有" + body.exp + "点经验,你的战斗力是" + (Math.round(body.pt)) + "" + rank_txt + "。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, client.name + ",你有" + body.exp + "点经验,你的战斗力是" + (Math.round(body.pt)) + "" + rank_txt + "。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE);
} }
...@@ -1663,7 +1662,6 @@ ...@@ -1663,7 +1662,6 @@
} }
if (settings.modules.deck_log.enabled && client.main && client.main.length && !client.deck_saved && client.ip !== '::ffff:127.0.0.1') { if (settings.modules.deck_log.enabled && client.main && client.main.length && !client.deck_saved && client.ip !== '::ffff:127.0.0.1') {
deck_text = '#ygopro-server deck log\n#main\n' + client.main.join('\n') + '\n!side\n' + client.side.join('\n') + '\n'; deck_text = '#ygopro-server deck log\n#main\n' + client.main.join('\n') + '\n!side\n' + client.side.join('\n') + '\n';
log.info("DECK LOG START", client.name, room.arena);
if (settings.modules.deck_log.local) { if (settings.modules.deck_log.local) {
deck_name = moment().format('YYYY-MM-DD HH-mm-ss') + ' ' + room.port + ' ' + client.pos + ' ' + client.name.replace(/\//g, '_'); deck_name = moment().format('YYYY-MM-DD HH-mm-ss') + ' ' + room.port + ' ' + client.pos + ' ' + client.name.replace(/\//g, '_');
fs.writeFile(settings.modules.deck_log.local + deck_name + '.ydk', deck_text, 'utf-8', function(err) { fs.writeFile(settings.modules.deck_log.local + deck_name + '.ydk', deck_text, 'utf-8', function(err) {
......
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