Commit 02496814 authored by nanahira's avatar nanahira

Revert "koishi room list"

This reverts commit 81446259.
parent 633dba53
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
"32": "HS_PLAYER_ENTER", "32": "HS_PLAYER_ENTER",
"33": "HS_PLAYER_CHANGE", "33": "HS_PLAYER_CHANGE",
"34": "HS_WATCH_CHANGE", "34": "HS_WATCH_CHANGE",
"48": "FIELD_FINISH", "48": "FIELD_FINISH"
"49": "SRVPRO_ROOMLIST"
}, },
"PLAYERCHANGE":{ "PLAYERCHANGE":{
"8": "OBSERVE", "8": "OBSERVE",
......
...@@ -73,9 +73,6 @@ ...@@ -73,9 +73,6 @@
"enabled": true, "enabled": true,
"get": false "get": false
}, },
"koishi_roomlist": {
"enabled": true
},
"vip": { "vip": {
"enabled": false, "enabled": false,
"generate_count": 500 "generate_count": 500
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
"chat_order_vip_dialogues": "/vip dialogues CARD_CODE DIALOGUE to set a dialogue for a specific card", "chat_order_vip_dialogues": "/vip dialogues CARD_CODE DIALOGUE to set a dialogue for a specific card",
"chat_order_vip_words": "/vip words WORD to set your word when joining in the server", "chat_order_vip_words": "/vip words WORD to set your word when joining in the server",
"chat_order_vip_victory": "/vip victory WORD to set your word when you win a duel", "chat_order_vip_victory": "/vip victory WORD to set your word when you win a duel",
"koishi_roomlist_hint": "Checking room list ...",
"room_name": "Room name is", "room_name": "Room name is",
"banned_chat_tip": "You are banned from chatting.", "banned_chat_tip": "You are banned from chatting.",
"banned_duel_tip": "You are banned from the random duel system for sending inappropriate messages.", "banned_duel_tip": "You are banned from the random duel system for sending inappropriate messages.",
...@@ -429,7 +428,6 @@ ...@@ -429,7 +428,6 @@
"chat_order_vip_dialogues": "/vip dialogues 卡号 台词 设置特定卡的召唤台词", "chat_order_vip_dialogues": "/vip dialogues 卡号 台词 设置特定卡的召唤台词",
"chat_order_vip_words": "/vip words 台词 设置自己的进场台词", "chat_order_vip_words": "/vip words 台词 设置自己的进场台词",
"chat_order_vip_victory": "/vip victory 台词 设置自己的胜利台词", "chat_order_vip_victory": "/vip victory 台词 设置自己的胜利台词",
"koishi_roomlist_hint": "正在获取房间列表……",
"room_name": "您当前的房间名是", "room_name": "您当前的房间名是",
"banned_chat_tip": "您已被禁言!", "banned_chat_tip": "您已被禁言!",
"banned_duel_tip": "您的发言存在严重不适当的内容,禁止您使用随机对战功能!", "banned_duel_tip": "您的发言存在严重不适当的内容,禁止您使用随机对战功能!",
......
...@@ -1974,74 +1974,6 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)-> ...@@ -1974,74 +1974,6 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
CLIENT_kick(client) CLIENT_kick(client)
return), 500 return), 500
else if info.pass.toUpperCase()=="L" and settings.modules.koishi_roomlist.enabled
ygopro.stoc_send_chat(client,"${koishi_roomlist_hint}", ygopro.constants.COLORS.BABYBLUE)
room_showed = []
for room in ROOM_all when room and room.established and room.name.indexOf('$') < 0
room_showed.push(room)
buffer_pos = 0
room_buffer = Buffer.alloc(2 + 333 * room_showed.length)
room_buffer.writeUInt16LE(room_showed.length, buffer_pos)
buffer_pos += 2
for room in room_showed
room_buffer.write(room.name, buffer_pos, 64, "utf8")
buffer_pos += 64
oppo_pos = if room.hostinfo.mode == 2 then 2 else 1
room_buffer.writeUInt8((if room.duel_stage == ygopro.constants.DUEL_STAGE.BEGIN then 0 else if room.duel_stage == ygopro.constants.DUEL_STAGE.SIDING then 2 else 1), buffer_pos)
buffer_pos++
room_buffer.writeInt8(room.duel_count, buffer_pos)
buffer_pos++
room_buffer.writeInt8((if room.turn? then room.turn else 0), buffer_pos)
buffer_pos++
room_players = []
for player in room.get_playing_player() when player
room_players[player.pos] = player
player_string = "???"
if room_players[0]
player_string = room_players[0].name
if room.hostinfo.mode == 2
player_string = player_string + "+" + (if room_players[1] then room_players[1].name else "???")
room_buffer.write(player_string, buffer_pos, 128, "utf8")
buffer_pos += 128
if room.duel_stage != ygopro.constants.DUEL_STAGE.BEGIN
room_buffer.writeInt8((if room_players[0] and room.scores[room_players[0].name_vpass]? then room.scores[room_players[0].name_vpass] else 0), buffer_pos)
buffer_pos++
room_buffer.writeInt32LE((if room_players[0] and room_players[0].lp? then room_players[0].lp else room.hostinfo.start_lp), buffer_pos)
buffer_pos += 4
else
room_buffer.writeInt8(0, buffer_pos)
buffer_pos++
room_buffer.writeInt32LE(0, buffer_pos)
buffer_pos += 4
player_string = "???"
if room_players[oppo_pos]
player_string = room_players[oppo_pos].name
if room.hostinfo.mode == 2
player_string = player_string + "+" + (if room_players[oppo_pos + 1] then room_players[oppo_pos + 1].name else "???")
room_buffer.write(player_string, buffer_pos, 128, "utf8")
buffer_pos += 128
if room.duel_stage != ygopro.constants.DUEL_STAGE.BEGIN
room_buffer.writeInt8((if room_players[oppo_pos] and room.scores[room_players[oppo_pos].name_vpass]? then room.scores[room_players[oppo_pos].name_vpass] else 0), buffer_pos)
buffer_pos++
room_buffer.writeInt32LE((if room_players[oppo_pos] and room_players[oppo_pos].lp? then room_players[oppo_pos].lp else room.hostinfo.start_lp), buffer_pos)
buffer_pos += 4
else
room_buffer.writeInt8(0, buffer_pos)
buffer_pos++
room_buffer.writeInt32LE(0, buffer_pos)
buffer_pos += 4
#console.log(room_buffer.length)
ygopro.stoc_send(client, "SRVPRO_ROOMLIST", room_buffer)
setTimeout (()->
ygopro.stoc_send client, 'ERROR_MSG',{
msg: 1
code: 9
}
CLIENT_kick(client)
return), 500
else if info.pass[0...2].toUpperCase()=="R#" and settings.modules.cloud_replay.enabled else if info.pass[0...2].toUpperCase()=="R#" and settings.modules.cloud_replay.enabled
replay_id=info.pass.split("#")[1] replay_id=info.pass.split("#")[1]
if (replay_id>0 and replay_id<=9) if (replay_id>0 and replay_id<=9)
......
...@@ -2503,7 +2503,7 @@ ...@@ -2503,7 +2503,7 @@
}); });
ygopro.ctos_follow('JOIN_GAME', false, function(buffer, info, client, server, datas) { ygopro.ctos_follow('JOIN_GAME', false, function(buffer, info, client, server, datas) {
var buffer_handle_callback, buffer_pos, check_buffer_indentity, len2, len3, len4, len5, len6, len7, len8, line, m, match_permit_callback, n, name, o, oppo_pos, p, player, player_string, pre_room, q, r, ref3, ref4, ref5, ref6, ref7, replay_id, room, room_buffer, room_players, room_showed, s; var buffer_handle_callback, check_buffer_indentity, len2, len3, len4, len5, line, m, match_permit_callback, n, name, o, p, pre_room, ref3, ref4, ref5, ref6, replay_id, room;
info.pass = info.pass.trim(); info.pass = info.pass.trim();
client.pass = info.pass; client.pass = info.pass;
if (CLIENT_is_able_to_reconnect(client) || CLIENT_is_able_to_kick_reconnect(client)) { if (CLIENT_is_able_to_reconnect(client) || CLIENT_is_able_to_kick_reconnect(client)) {
...@@ -2535,87 +2535,6 @@ ...@@ -2535,87 +2535,6 @@
}); });
CLIENT_kick(client); CLIENT_kick(client);
}), 500); }), 500);
} else if (info.pass.toUpperCase() === "L" && settings.modules.koishi_roomlist.enabled) {
ygopro.stoc_send_chat(client, "${koishi_roomlist_hint}", ygopro.constants.COLORS.BABYBLUE);
room_showed = [];
for (m = 0, len2 = ROOM_all.length; m < len2; m++) {
room = ROOM_all[m];
if (room && room.established && room.name.indexOf('$') < 0) {
room_showed.push(room);
}
}
buffer_pos = 0;
room_buffer = Buffer.alloc(2 + 333 * room_showed.length);
room_buffer.writeUInt16LE(room_showed.length, buffer_pos);
buffer_pos += 2;
for (n = 0, len3 = room_showed.length; n < len3; n++) {
room = room_showed[n];
room_buffer.write(room.name, buffer_pos, 64, "utf8");
buffer_pos += 64;
oppo_pos = room.hostinfo.mode === 2 ? 2 : 1;
room_buffer.writeUInt8((room.duel_stage === ygopro.constants.DUEL_STAGE.BEGIN ? 0 : room.duel_stage === ygopro.constants.DUEL_STAGE.SIDING ? 2 : 1), buffer_pos);
buffer_pos++;
room_buffer.writeInt8(room.duel_count, buffer_pos);
buffer_pos++;
room_buffer.writeInt8((room.turn != null ? room.turn : 0), buffer_pos);
buffer_pos++;
room_players = [];
ref3 = room.get_playing_player();
for (o = 0, len4 = ref3.length; o < len4; o++) {
player = ref3[o];
if (player) {
room_players[player.pos] = player;
}
}
player_string = "???";
if (room_players[0]) {
player_string = room_players[0].name;
}
if (room.hostinfo.mode === 2) {
player_string = player_string + "+" + (room_players[1] ? room_players[1].name : "???");
}
room_buffer.write(player_string, buffer_pos, 128, "utf8");
buffer_pos += 128;
if (room.duel_stage !== ygopro.constants.DUEL_STAGE.BEGIN) {
room_buffer.writeInt8((room_players[0] && (room.scores[room_players[0].name_vpass] != null) ? room.scores[room_players[0].name_vpass] : 0), buffer_pos);
buffer_pos++;
room_buffer.writeInt32LE((room_players[0] && (room_players[0].lp != null) ? room_players[0].lp : room.hostinfo.start_lp), buffer_pos);
buffer_pos += 4;
} else {
room_buffer.writeInt8(0, buffer_pos);
buffer_pos++;
room_buffer.writeInt32LE(0, buffer_pos);
buffer_pos += 4;
}
player_string = "???";
if (room_players[oppo_pos]) {
player_string = room_players[oppo_pos].name;
}
if (room.hostinfo.mode === 2) {
player_string = player_string + "+" + (room_players[oppo_pos + 1] ? room_players[oppo_pos + 1].name : "???");
}
room_buffer.write(player_string, buffer_pos, 128, "utf8");
buffer_pos += 128;
if (room.duel_stage !== ygopro.constants.DUEL_STAGE.BEGIN) {
room_buffer.writeInt8((room_players[oppo_pos] && (room.scores[room_players[oppo_pos].name_vpass] != null) ? room.scores[room_players[oppo_pos].name_vpass] : 0), buffer_pos);
buffer_pos++;
room_buffer.writeInt32LE((room_players[oppo_pos] && (room_players[oppo_pos].lp != null) ? room_players[oppo_pos].lp : room.hostinfo.start_lp), buffer_pos);
buffer_pos += 4;
} else {
room_buffer.writeInt8(0, buffer_pos);
buffer_pos++;
room_buffer.writeInt32LE(0, buffer_pos);
buffer_pos += 4;
}
}
ygopro.stoc_send(client, "SRVPRO_ROOMLIST", room_buffer);
setTimeout((function() {
ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 1,
code: 9
});
CLIENT_kick(client);
}), 500);
} else if (info.pass.slice(0, 2).toUpperCase() === "R#" && settings.modules.cloud_replay.enabled) { } else if (info.pass.slice(0, 2).toUpperCase() === "R#" && settings.modules.cloud_replay.enabled) {
replay_id = info.pass.split("#")[1]; replay_id = info.pass.split("#")[1];
if (replay_id > 0 && replay_id <= 9) { if (replay_id > 0 && replay_id <= 9) {
...@@ -2658,15 +2577,15 @@ ...@@ -2658,15 +2577,15 @@
return; return;
} }
check_buffer_indentity = function(buf) { check_buffer_indentity = function(buf) {
var checksum, i, p, ref4; var checksum, i, m, ref3;
checksum = 0; checksum = 0;
for (i = p = 0, ref4 = buf.length; 0 <= ref4 ? p < ref4 : p > ref4; i = 0 <= ref4 ? ++p : --p) { for (i = m = 0, ref3 = buf.length; 0 <= ref3 ? m < ref3 : m > ref3; i = 0 <= ref3 ? ++m : --m) {
checksum += buf.readUInt8(i); checksum += buf.readUInt8(i);
} }
return (checksum & 0xFF) === 0; return (checksum & 0xFF) === 0;
}; };
buffer_handle_callback = function(buffer, decrypted_buffer, match_permit) { buffer_handle_callback = function(buffer, decrypted_buffer, match_permit) {
var action, len5, len6, len7, len8, line, name, opt1, opt2, opt3, options, p, q, r, ref4, ref5, ref6, ref7, s, title; var action, len2, len3, len4, len5, line, m, n, name, o, opt1, opt2, opt3, options, p, player, ref3, ref4, ref5, ref6, room, title;
if (client.closed) { if (client.closed) {
return; return;
} }
...@@ -2724,9 +2643,9 @@ ...@@ -2724,9 +2643,9 @@
} }
room = ROOM_find_or_create_by_name('M#' + info.pass.slice(8)); room = ROOM_find_or_create_by_name('M#' + info.pass.slice(8));
if (room) { if (room) {
ref4 = room.get_playing_player(); ref3 = room.get_playing_player();
for (p = 0, len5 = ref4.length; p < len5; p++) { for (m = 0, len2 = ref3.length; m < len2; m++) {
player = ref4[p]; player = ref3[m];
if (!(player && player.name === client.name)) { if (!(player && player.name === client.name)) {
continue; continue;
} }
...@@ -2763,24 +2682,24 @@ ...@@ -2763,24 +2682,24 @@
client.rid = _.indexOf(ROOM_all, room); client.rid = _.indexOf(ROOM_all, room);
client.is_post_watcher = true; client.is_post_watcher = true;
if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) { if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) {
ref5 = _.lines(vip_info.players[client.name].words); ref4 = _.lines(vip_info.players[client.name].words);
for (q = 0, len6 = ref5.length; q < len6; q++) { for (n = 0, len3 = ref4.length; n < len3; n++) {
line = ref5[q]; line = ref4[n];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} else if (settings.modules.words.enabled && words.words[client.name]) { } else if (settings.modules.words.enabled && words.words[client.name]) {
ref6 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]); ref5 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]);
for (r = 0, len7 = ref6.length; r < len7; r++) { for (o = 0, len4 = ref5.length; o < len4; o++) {
line = ref6[r]; line = ref5[o];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} }
ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}"); ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}");
room.watchers.push(client); room.watchers.push(client);
ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE);
ref7 = room.watcher_buffers; ref6 = room.watcher_buffers;
for (s = 0, len8 = ref7.length; s < len8; s++) { for (p = 0, len5 = ref6.length; p < len5; p++) {
buffer = ref7[s]; buffer = ref6[p];
client.write(buffer); client.write(buffer);
} }
} else { } else {
...@@ -2795,16 +2714,16 @@ ...@@ -2795,16 +2714,16 @@
} }
}; };
match_permit_callback = function(buffer, match_permit) { match_permit_callback = function(buffer, match_permit) {
var decrypted_buffer, i, id, len5, p, ref4, secret; var decrypted_buffer, i, id, len2, m, ref3, secret;
if (client.closed) { if (client.closed) {
return; return;
} }
if (id = users_cache[client.name]) { if (id = users_cache[client.name]) {
secret = id % 65535 + 1; secret = id % 65535 + 1;
decrypted_buffer = Buffer.allocUnsafe(6); decrypted_buffer = Buffer.allocUnsafe(6);
ref4 = [0, 2, 4]; ref3 = [0, 2, 4];
for (p = 0, len5 = ref4.length; p < len5; p++) { for (m = 0, len2 = ref3.length; m < len2; m++) {
i = ref4[p]; i = ref3[m];
decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i); decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i);
} }
if (check_buffer_indentity(decrypted_buffer)) { if (check_buffer_indentity(decrypted_buffer)) {
...@@ -2821,14 +2740,14 @@ ...@@ -2821,14 +2740,14 @@
}, },
json: true json: true
}, function(error, response, body) { }, function(error, response, body) {
var len6, q, ref5; var len3, n, ref4;
if (body && body.user) { if (body && body.user) {
users_cache[client.name] = body.user.id; users_cache[client.name] = body.user.id;
secret = body.user.id % 65535 + 1; secret = body.user.id % 65535 + 1;
decrypted_buffer = Buffer.allocUnsafe(6); decrypted_buffer = Buffer.allocUnsafe(6);
ref5 = [0, 2, 4]; ref4 = [0, 2, 4];
for (q = 0, len6 = ref5.length; q < len6; q++) { for (n = 0, len3 = ref4.length; n < len3; n++) {
i = ref5[q]; i = ref4[n];
decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i); decrypted_buffer.writeUInt16LE(buffer.readUInt16LE(i) ^ secret, i);
} }
if (check_buffer_indentity(decrypted_buffer)) { if (check_buffer_indentity(decrypted_buffer)) {
...@@ -2875,9 +2794,9 @@ ...@@ -2875,9 +2794,9 @@
ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}"); ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}");
room.watchers.push(client); room.watchers.push(client);
ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE);
ref4 = room.watcher_buffers; ref3 = room.watcher_buffers;
for (p = 0, len5 = ref4.length; p < len5; p++) { for (m = 0, len2 = ref3.length; m < len2; m++) {
buffer = ref4[p]; buffer = ref3[m];
client.write(buffer); client.write(buffer);
} }
} else { } else {
...@@ -2913,7 +2832,7 @@ ...@@ -2913,7 +2832,7 @@
challonge.matches._index({ challonge.matches._index({
id: settings.modules.challonge.tournament_id, id: settings.modules.challonge.tournament_id,
callback: function(err, data) { callback: function(err, data) {
var len6, len7, len8, len9, line, match, q, r, ref5, ref6, ref7, ref8, s, t; var len3, len4, len5, len6, line, match, n, o, p, player, q, ref4, ref5, ref6, ref7;
if (client.closed) { if (client.closed) {
return; return;
} }
...@@ -2950,24 +2869,24 @@ ...@@ -2950,24 +2869,24 @@
client.rid = _.indexOf(ROOM_all, room); client.rid = _.indexOf(ROOM_all, room);
client.is_post_watcher = true; client.is_post_watcher = true;
if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) { if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) {
ref5 = _.lines(vip_info.players[client.name].words); ref4 = _.lines(vip_info.players[client.name].words);
for (q = 0, len6 = ref5.length; q < len6; q++) { for (n = 0, len3 = ref4.length; n < len3; n++) {
line = ref5[q]; line = ref4[n];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} else if (settings.modules.words.enabled && words.words[client.name]) { } else if (settings.modules.words.enabled && words.words[client.name]) {
ref6 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]); ref5 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]);
for (r = 0, len7 = ref6.length; r < len7; r++) { for (o = 0, len4 = ref5.length; o < len4; o++) {
line = ref6[r]; line = ref5[o];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} }
ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}"); ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}");
room.watchers.push(client); room.watchers.push(client);
ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE);
ref7 = room.watcher_buffers; ref6 = room.watcher_buffers;
for (s = 0, len8 = ref7.length; s < len8; s++) { for (p = 0, len5 = ref6.length; p < len5; p++) {
buffer = ref7[s]; buffer = ref6[p];
client.write(buffer); client.write(buffer);
} }
} else { } else {
...@@ -2976,9 +2895,9 @@ ...@@ -2976,9 +2895,9 @@
} else if (room.hostinfo.no_watch && room.players.length >= (room.hostinfo.mode === 2 ? 4 : 2)) { } else if (room.hostinfo.no_watch && room.players.length >= (room.hostinfo.mode === 2 ? 4 : 2)) {
ygopro.stoc_die(client, "${watch_denied_room}"); ygopro.stoc_die(client, "${watch_denied_room}");
} else { } else {
ref8 = room.get_playing_player(); ref7 = room.get_playing_player();
for (t = 0, len9 = ref8.length; t < len9; t++) { for (q = 0, len6 = ref7.length; q < len6; q++) {
player = ref8[t]; player = ref7[q];
if (!(player && player !== client && player.challonge_info.id === client.challonge_info.id)) { if (!(player && player !== client && player.challonge_info.id === client.challonge_info.id)) {
continue; continue;
} }
...@@ -3041,24 +2960,24 @@ ...@@ -3041,24 +2960,24 @@
client.rid = _.indexOf(ROOM_all, room); client.rid = _.indexOf(ROOM_all, room);
client.is_post_watcher = true; client.is_post_watcher = true;
if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) { if (settings.modules.vip.enabled && client.vip && vip_info.players[client.name].words) {
ref5 = _.lines(vip_info.players[client.name].words); ref4 = _.lines(vip_info.players[client.name].words);
for (q = 0, len6 = ref5.length; q < len6; q++) { for (n = 0, len3 = ref4.length; n < len3; n++) {
line = ref5[q]; line = ref4[n];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} else if (settings.modules.words.enabled && words.words[client.name]) { } else if (settings.modules.words.enabled && words.words[client.name]) {
ref6 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]); ref5 = _.lines(words.words[client.name][Math.floor(Math.random() * words.words[client.name].length)]);
for (r = 0, len7 = ref6.length; r < len7; r++) { for (o = 0, len4 = ref5.length; o < len4; o++) {
line = ref6[r]; line = ref5[o];
ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, line, ygopro.constants.COLORS.PINK);
} }
} }
ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}"); ygopro.stoc_send_chat_to_room(room, client.name + " ${watch_join}");
room.watchers.push(client); room.watchers.push(client);
ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE);
ref7 = room.watcher_buffers; ref6 = room.watcher_buffers;
for (s = 0, len8 = ref7.length; s < len8; s++) { for (p = 0, len5 = ref6.length; p < len5; p++) {
buffer = ref7[s]; buffer = ref6[p];
client.write(buffer); client.write(buffer);
} }
} else { } else {
......
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