Commit fcaf3026 authored by nanahira's avatar nanahira

js

parent 8f134e23
// Generated by CoffeeScript 1.12.7
(function() {
<<<<<<< HEAD
var Cloud_replay_ids, ROOM_all, ROOM_bad_ip, ROOM_ban_player, ROOM_connected_ip, ROOM_find_by_name, ROOM_find_by_port, ROOM_find_by_title, ROOM_find_or_create_ai, ROOM_find_or_create_by_name, ROOM_find_or_create_random, ROOM_players_banned, ROOM_players_oppentlist, ROOM_unwelcome, ROOM_validate, Room, _, addCallback, badwords, ban_user, bunyan, chat_color, config, cppversion, crypto, date, default_config, default_data, dialogues, duel_log, e, exec, execFile, fs, geoip, get_memory_usage, http, http_server, https, https_server, j, k, len, len1, lflists, list, loadJSON, load_dialogues, load_dialogues_custom, load_tips, load_words, log, memory_usage, merge, moment, net, oldbadwords, oldconfig, olddialogues, oldduellog, oldtips, oldwords, options, os, path, pgClient, pg_client, pg_query, redis, redisdb, ref, ref1, report_to_big_brother, request, requestListener, roomlist, setting_change, setting_save, settings, spawn, spawnSync, tips, url, users_cache, wait_room_start, wait_room_start_arena, windbot_bin, windbot_parameters, windbot_process, windbots, words, ygopro, zlib;
=======
var CLIENT_get_authorize_key, CLIENT_import_data, CLIENT_is_able_to_reconnect, CLIENT_is_player, CLIENT_kick, CLIENT_pre_reconnect, CLIENT_reconnect, CLIENT_reconnect_register, CLIENT_reconnect_unregister, CLIENT_send_pre_reconnect_info, CLIENT_send_reconnect_info, Cloud_replay_ids, ROOM_all, ROOM_bad_ip, ROOM_ban_player, ROOM_connected_ip, ROOM_find_by_name, ROOM_find_by_port, ROOM_find_by_title, ROOM_find_or_create_ai, ROOM_find_or_create_by_name, ROOM_find_or_create_random, ROOM_players_banned, ROOM_players_oppentlist, ROOM_unwelcome, ROOM_validate, Room, SERVER_clear_disconnect, _, addCallback, badwords, ban_user, bunyan, chat_color, config, cppversion, crypto, date, default_config, default_data, dialogues, disconnect_list, duel_log, e, exec, execFile, fs, geoip, get_memory_usage, http, http_server, https, https_server, j, l, len, len1, lflists, list, loadJSON, load_dialogues, load_tips, log, memory_usage, merge, moment, net, oldbadwords, oldconfig, olddialogues, oldduellog, oldtips, options, os, path, pgClient, pg_client, pg_query, redis, redisdb, ref, ref1, release_disconnect, report_to_big_brother, request, requestListener, roomlist, setting_change, setting_save, settings, spawn, spawnSync, tips, url, users_cache, wait_room_start, wait_room_start_arena, windbot_bin, windbot_parameters, windbot_process, windbots, ygopro, zlib;
>>>>>>> mc
var CLIENT_get_authorize_key, CLIENT_import_data, CLIENT_is_able_to_reconnect, CLIENT_is_player, CLIENT_kick, CLIENT_pre_reconnect, CLIENT_reconnect, CLIENT_reconnect_register, CLIENT_reconnect_unregister, CLIENT_send_pre_reconnect_info, CLIENT_send_reconnect_info, Cloud_replay_ids, ROOM_all, ROOM_bad_ip, ROOM_ban_player, ROOM_connected_ip, ROOM_find_by_name, ROOM_find_by_port, ROOM_find_by_title, ROOM_find_or_create_ai, ROOM_find_or_create_by_name, ROOM_find_or_create_random, ROOM_players_banned, ROOM_players_oppentlist, ROOM_unwelcome, ROOM_validate, Room, SERVER_clear_disconnect, _, addCallback, badwords, ban_user, bunyan, chat_color, config, cppversion, crypto, date, default_config, default_data, dialogues, disconnect_list, duel_log, e, exec, execFile, fs, geoip, get_memory_usage, http, http_server, https, https_server, j, l, len, len1, lflists, list, loadJSON, load_dialogues, load_dialogues_custom, load_tips, load_words, log, memory_usage, merge, moment, net, oldbadwords, oldconfig, olddialogues, oldduellog, oldtips, oldwords, options, os, path, pgClient, pg_client, pg_query, redis, redisdb, ref, ref1, release_disconnect, report_to_big_brother, request, requestListener, roomlist, setting_change, setting_save, settings, spawn, spawnSync, tips, url, users_cache, wait_room_start, wait_room_start_arena, windbot_bin, windbot_parameters, windbot_process, windbots, words, ygopro, zlib;
net = require('net');
......@@ -1846,22 +1842,19 @@
});
ygopro.stoc_follow('JOIN_GAME', false, function(buffer, info, client, server) {
var l, len2, line, recorder, ref2, room, watcher;
var len2, line, m, recorder, ref2, room, watcher;
room = ROOM_all[client.rid];
if (!(room && !client.reconnecting)) {
return;
}
<<<<<<< HEAD
client.join_game_buffer = buffer;
if (settings.modules.words.enabled && words.words[client.name]) {
ref2 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]);
for (l = 0, len2 = ref2.length; l < len2; l++) {
line = ref2[l];
for (m = 0, len2 = ref2.length; m < len2; m++) {
line = ref2[m];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
}
}
=======
client.join_game_buffer = buffer;
>>>>>>> mc
if (settings.modules.welcome) {
ygopro.stoc_send_chat(client, settings.modules.welcome, ygopro.constants.COLORS.GREEN);
}
......@@ -1916,25 +1909,15 @@
ygopro.ctos_send(watcher, 'HS_TOOBSERVER');
});
watcher.on('data', function(data) {
<<<<<<< HEAD
var len3, m, ref3, w;
=======
var len2, m, ref2, w;
>>>>>>> mc
var len3, n, ref3, w;
room = ROOM_all[client.rid];
if (!room) {
return;
}
room.watcher_buffers.push(data);
<<<<<<< HEAD
ref3 = room.watchers;
for (m = 0, len3 = ref3.length; m < len3; m++) {
w = ref3[m];
=======
ref2 = room.watchers;
for (m = 0, len2 = ref2.length; m < len2; m++) {
w = ref2[m];
>>>>>>> mc
for (n = 0, len3 = ref3.length; n < len3; n++) {
w = ref3[n];
if (w) {
w.write(data);
}
......@@ -2005,11 +1988,7 @@
}
ygopro.stoc_follow('GAME_MSG', true, function(buffer, info, client, server) {
<<<<<<< HEAD
var card, count, l, len2, len3, line, loc, m, msg, oppo_pos, phase, playertype, pos, reason, ref2, ref3, ref4, ref5, room, trigger_location, val, win_pos;
=======
var card, count, len2, line, loc, m, msg, oppo_pos, phase, playertype, pos, reason, ref2, ref3, ref4, room, trigger_location, val, win_pos;
>>>>>>> mc
var card, count, len2, len3, line, loc, m, msg, n, oppo_pos, phase, playertype, pos, reason, ref2, ref3, ref4, ref5, room, trigger_location, val, win_pos;
room = ROOM_all[client.rid];
if (!(room && !client.reconnecting)) {
return;
......@@ -2238,27 +2217,19 @@
if (ygopro.constants.MSG[msg] === 'SUMMONING' || ygopro.constants.MSG[msg] === 'SPSUMMONING' || ygopro.constants.MSG[msg] === 'CHAINING') {
card = buffer.readUInt32LE(1);
trigger_location = buffer.readUInt8(6);
<<<<<<< HEAD
if (ygopro.constants.MSG[msg] !== 'CHAINING' || (trigger_location & 0x8) && !(trigger_location & 0x200)) {
if (dialogues.dialogues[card]) {
ref4 = _.lines(dialogues.dialogues[card][Math.floor(Math.random() * dialogues.dialogues[card].length)]);
for (l = 0, len2 = ref4.length; l < len2; l++) {
line = ref4[l];
for (m = 0, len2 = ref4.length; m < len2; m++) {
line = ref4[m];
ygopro.stoc_send_chat(client, line, ygopro.constants.COLORS.PINK);
}
} else if (dialogues.dialogues_custom[card]) {
ref5 = _.lines(dialogues.dialogues_custom[card][Math.floor(Math.random() * dialogues.dialogues_custom[card].length)]);
for (m = 0, len3 = ref5.length; m < len3; m++) {
line = ref5[m];
for (n = 0, len3 = ref5.length; n < len3; n++) {
line = ref5[n];
ygopro.stoc_send_chat(client, line, ygopro.constants.COLORS.PINK);
}
=======
if (dialogues.dialogues[card] && (ygopro.constants.MSG[msg] !== 'CHAINING' || (trigger_location & 0x8) && !(trigger_location & 0x200))) {
ref4 = _.lines(dialogues.dialogues[card][Math.floor(Math.random() * dialogues.dialogues[card].length)]);
for (m = 0, len2 = ref4.length; m < len2; m++) {
line = ref4[m];
ygopro.stoc_send_chat(client, line, ygopro.constants.COLORS.PINK);
>>>>>>> mc
}
}
}
......
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