Commit c8110c39 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 63540843 4b56a0c2
Pipeline #1480 failed with stages
in 10 minutes and 5 seconds
......@@ -706,7 +706,7 @@ ban_user = global.ban_user = (name) ->
bans = [dataManager.getBan(name, null)]
for room in ROOM_all when room and room.established
for playerType in ["players", "watchers"]
for player in room[playerType] when player.name == name or bans.find(ban => player.ip == ban.ip)
for player in room[playerType] when player.name == name or bans.find((ban) => player.ip == ban.ip)
bans.push(dataManager.getBan(name, player.ip))
ROOM_bad_ip[player.ip]=99
ygopro.stoc_send_chat_to_room(room, "#{player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED)
......
......@@ -917,9 +917,9 @@
ref1 = room[playerType];
for (m = 0, len2 = ref1.length; m < len2; m++) {
player = ref1[m];
if (!(player.name === name || bans.find(ban(() => {
if (!(player.name === name || bans.find((ban) => {
return player.ip === ban.ip;
})))) {
}))) {
continue;
}
bans.push(dataManager.getBan(name, player.ip));
......
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