Commit b4b6c67d authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 2cd8268f 0066cb92
...@@ -597,7 +597,7 @@ CLIENT_reconnect_register = (client, room_id, error) -> ...@@ -597,7 +597,7 @@ CLIENT_reconnect_register = (client, room_id, error) ->
room = ROOM_all[room_id] room = ROOM_all[room_id]
if client.had_new_reconnection if client.had_new_reconnection
return false return false
if !settings.modules.reconnect.enabled or !room or client.system_kicked or client.flee_free or disconnect_list[CLIENT_get_authorize_key(client)] or client.is_post_watcher or !CLIENT_is_player(client, room) or !room.started or room.windbot or (settings.modules.reconnect.auto_surrender_after_disconnect and room.hostinfo.mode != 1) or (room.random_type and room.get_disconnected_count() > 0) if !settings.modules.reconnect.enabled or !room or client.system_kicked or client.flee_free or disconnect_list[CLIENT_get_authorize_key(client)] or client.is_post_watcher or !CLIENT_is_player(client, room) or !room.started or room.windbot or (settings.modules.reconnect.auto_surrender_after_disconnect and room.hostinfo.mode != 1) or (room.random_type and room.get_disconnected_count() > 1)
return false return false
# for player in room.players # for player in room.players
# if player != client and CLIENT_get_authorize_key(player) == CLIENT_get_authorize_key(client) # if player != client and CLIENT_get_authorize_key(player) == CLIENT_get_authorize_key(client)
...@@ -1178,7 +1178,7 @@ class Room ...@@ -1178,7 +1178,7 @@ class Room
@finished = true @finished = true
if !@finished_by_death if !@finished_by_death
@scores[client.name] = -9 @scores[client.name] = -9
if @random_type and not client.flee_free and (!settings.modules.reconnect.enabled or @get_disconnected_count() == 0) if @random_type and not client.flee_free and (!settings.modules.reconnect.enabled or @get_disconnected_count() <= 1)
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}") ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}")
if @players.length and !(@windbot and client.is_host) and !(@arena and !@started and client.pos <= 3) if @players.length and !(@windbot and client.is_host) and !(@arena and !@started and client.pos <= 3)
ygopro.stoc_send_chat_to_room this, "#{client.name} ${left_game}" + if error then ": #{error}" else '' ygopro.stoc_send_chat_to_room this, "#{client.name} ${left_game}" + if error then ": #{error}" else ''
......
...@@ -787,7 +787,7 @@ ...@@ -787,7 +787,7 @@
if (client.had_new_reconnection) { if (client.had_new_reconnection) {
return false; return false;
} }
if (!settings.modules.reconnect.enabled || !room || client.system_kicked || client.flee_free || disconnect_list[CLIENT_get_authorize_key(client)] || client.is_post_watcher || !CLIENT_is_player(client, room) || !room.started || room.windbot || (settings.modules.reconnect.auto_surrender_after_disconnect && room.hostinfo.mode !== 1) || (room.random_type && room.get_disconnected_count() > 0)) { if (!settings.modules.reconnect.enabled || !room || client.system_kicked || client.flee_free || disconnect_list[CLIENT_get_authorize_key(client)] || client.is_post_watcher || !CLIENT_is_player(client, room) || !room.started || room.windbot || (settings.modules.reconnect.auto_surrender_after_disconnect && room.hostinfo.mode !== 1) || (room.random_type && room.get_disconnected_count() > 1)) {
return false; return false;
} }
dinfo = { dinfo = {
...@@ -1546,7 +1546,7 @@ ...@@ -1546,7 +1546,7 @@
this.finished = true; this.finished = true;
if (!this.finished_by_death) { if (!this.finished_by_death) {
this.scores[client.name] = -9; this.scores[client.name] = -9;
if (this.random_type && !client.flee_free && (!settings.modules.reconnect.enabled || this.get_disconnected_count() === 0)) { if (this.random_type && !client.flee_free && (!settings.modules.reconnect.enabled || this.get_disconnected_count() <= 1)) {
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}"); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}");
} }
} }
......
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