Commit 02496814 authored by nanahira's avatar nanahira

Revert "koishi room list"

This reverts commit 81446259.
parent 633dba53
......@@ -53,8 +53,7 @@
"32": "HS_PLAYER_ENTER",
"33": "HS_PLAYER_CHANGE",
"34": "HS_WATCH_CHANGE",
"48": "FIELD_FINISH",
"49": "SRVPRO_ROOMLIST"
"48": "FIELD_FINISH"
},
"PLAYERCHANGE":{
"8": "OBSERVE",
......
......@@ -73,9 +73,6 @@
"enabled": true,
"get": false
},
"koishi_roomlist": {
"enabled": true
},
"vip": {
"enabled": false,
"generate_count": 500
......
......@@ -89,7 +89,6 @@
"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_victory": "/vip victory WORD to set your word when you win a duel",
"koishi_roomlist_hint": "Checking room list ...",
"room_name": "Room name is",
"banned_chat_tip": "You are banned from chatting.",
"banned_duel_tip": "You are banned from the random duel system for sending inappropriate messages.",
......@@ -429,7 +428,6 @@
"chat_order_vip_dialogues": "/vip dialogues 卡号 台词 设置特定卡的召唤台词",
"chat_order_vip_words": "/vip words 台词 设置自己的进场台词",
"chat_order_vip_victory": "/vip victory 台词 设置自己的胜利台词",
"koishi_roomlist_hint": "正在获取房间列表……",
"room_name": "您当前的房间名是",
"banned_chat_tip": "您已被禁言!",
"banned_duel_tip": "您的发言存在严重不适当的内容,禁止您使用随机对战功能!",
......
......@@ -1974,74 +1974,6 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server, datas)->
CLIENT_kick(client)
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
replay_id=info.pass.split("#")[1]
if (replay_id>0 and replay_id<=9)
......
This diff is collapsed.
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