Commit 6c68a843 authored by mercury233's avatar mercury233

update

parent 86d8b5b3
{ {
"en-us": { "en-us": {
"kicked_by_system": "been removed from the game.",
"random_duel_enter_room_waiting": "Your opponent is already waiting for you, start now!", "random_duel_enter_room_waiting": "Your opponent is already waiting for you, start now!",
"random_duel_enter_room_new": "Game created, waiting for random opponent.", "random_duel_enter_room_new": "Game created, waiting for random opponent.",
"random_duel_enter_room_match": "Match mode, better use competitive decks!", "random_duel_enter_room_match": "Match mode, better use competitive decks!",
"random_banned_part1": "You have been banned from the game due to ", "random_banned_part1": "You have been banned from the game due to ",
"random_banned_part2": ", it will last until ", "random_banned_part2": ", it will last until ",
"random_banned_part3": ".", "random_banned_part3": ".",
"random_warn_part1": "The system detects that recently you had", "random_deprecated_part1": "Recently, you have committed",
"random_deprecated_part2": ", therefore you will only meet players with similar offence within ",
"random_deprecated_part3": ".",
"random_warn_part1": "The system detects that recently you had ",
"random_warn_part2": ", you will be penalized after 3 offences", "random_warn_part2": ", you will be penalized after 3 offences",
"random_ban_reason_separator": "/",
"random_ban_reason_flee": "Flee",
"random_ban_reason_AFK": "AFK",
"random_ban_reason_abuse": "Abusing",
"random_ban_reason_zombie": "Zombie",
"windbot_deck_not_found": "Oops, AI or Deck not found", "windbot_deck_not_found": "Oops, AI or Deck not found",
"windbot_name_too_long": "Error occurred, please create a new game and enter /ai to summon an AI.", "windbot_name_too_long": "Error occurred, please create a new game and enter /ai to summon an AI.",
"duel_room_new_failed": "Failed to create a new game, please try again later.", "create_room_failed": "Failed to create a new game, please try again later.",
"add_windbot_failed": "Failed to add an AI, you may want to enter /ai again.", "add_windbot_failed": "Failed to add an AI, you may want to enter /ai again.",
"quit_spectate": "left as spectator", "quit_watch": "left as spectator",
"flee": "fled",
"left_game": "left the game", "left_game": "left the game",
"server_closed": "The connection was ended by the server.", "server_closed": "The connection was ended by the server.",
"server_error": "server error:", "server_error": "Server error:",
"cloud_replay_no": "replay not found", "cloud_replay_no": "Replay not found.",
"cloud_replay_error": "replay error", "cloud_replay_error": "Fail to open replay.",
"cloud_replay_playing": "Accessing cloud replay", "cloud_replay_playing": "Accessing cloud replay",
"cloud_replay_hint": "These were the replay codes of the saved replays, please enter the replay code at the password column to access it.", "cloud_replay_hint": "These were the replay codes of the saved replays, please enter the replay code at the password column to access it.",
"blank_room_name": "Game name should not be blank, please fill in something.", "blank_room_name": "Game password should not be blank, please fill in something.",
"loading_user_info": "Loading user info...", "loading_user_info": "Loading user info...",
"invalid_password_length": "Password invalid (Invalid Length)", "invalid_password_length": "Password invalid (Invalid Length)",
"invalid_password_payload": "Password invalid (Invalid Payload Length)", "invalid_password_payload": "Password invalid (Invalid Payload Length)",
...@@ -30,78 +36,75 @@ ...@@ -30,78 +36,75 @@
"invalid_password_existed": "Password invalid (Already Existed)", "invalid_password_existed": "Password invalid (Already Existed)",
"invalid_password_not_found": "Password invalid (Not Found)", "invalid_password_not_found": "Password invalid (Not Found)",
"invalid_password_action": "Password invalid (Invalid Action)", "invalid_password_action": "Password invalid (Invalid Action)",
"server_full": "The server is full, please try again later.",
"invalid_password_checksum": "Password incorrect (Checksum Failed)", "invalid_password_checksum": "Password incorrect (Checksum Failed)",
"enter_correct_user": "Please enter the correct ID", "bad_user_name": "Please enter the correct ID",
"client_overload": "Too many clients running at the moment! ", "server_full": "The server is full, please try again later.",
"too_much_connection": "Too many clients running at the moment! ",
"banned_ip_login": "You have been banned.", "banned_ip_login": "You have been banned.",
"banned_user_login": "You have been banned.", "banned_user_login": "You have been banned.",
"bad_name_level3": "Your ID contains illegal characters.", "bad_name_level3": "Your ID contains illegal words.",
"bad_name_level2": "Your ID contains illegal characters.", "bad_name_level2": "Your ID contains illegal words.",
"bad_name_level1": "Your ID contains inappropriate langauge.", "bad_name_level1": "Your ID contains inappropriate words.",
"invalid_password_room": "Password incorrect", "invalid_password_room": "Password incorrect",
"outdated_client": "You are currently using an outdated client, unknown errors may occur, please update.", "outdated_client": "You are currently using an outdated client, unknown errors may occur, please update.",
"spectate_join": "joined as spectator.", "watch_join": "joined as spectator.",
"spectate_present": "is spectating.", "watch_watching": "You are spectating.",
"spectate_denied": "The duel had begun, spectation is not allowed", "watch_denied": "The duel had begun, spectation is not allowed",
"rank_arena": ", Your ranking is", "rank_arena": ", Your ranking is",
"rank_blank": ", You are not ranked", "rank_blank": ", You are not ranked.",
"exp_value_part1": "You have", "exp_value_part1": ", You have ",
"exp_value_part2": "exp", "exp_value_part2": " exp",
"exp_value_part3": ",your power level is", "exp_value_part3": ", your score is ",
"exp_value_part4": ". These points may be reset after officla launch.", "exp_value_part4": ". These points may be reset after the stable release of MyCard.",
"lp_low_level1": "お前のライフはもうまるで风前の灯火!", "lp_low_opponent": "お前のライフはもうまるで风前の灯火!",
"lp_low_level2": "*Low LP Alert*", "lp_low_self": "*Low LP Alert*",
"away_from_keyboard": "Please begin, your opponent is waiting.", "kicked_by_player": "was removed from the game.",
"kicked_by_player": "removed from the game", "kicked_by_system": "was removed from the game by system.",
"kicked_by_system_count_down": "seconds before the host being removed for not starting the game.", "kick_count_down": "seconds before the host being removed for not starting the game.",
"chat_order_main": "Mycard YGOPro Server function list", "chat_order_main": "Mycard YGOPro Server function list",
"chat_order_help": "/help show this list", "chat_order_help": "/help show this list",
"chat_order_roomname": "/roomname show room name", "chat_order_roomname": "/roomname show room name",
"chat_order_windbot": "/ai to add an AI,/ai name to add selected AI ", "chat_order_windbot": "/ai to add an AI,/ai name to add selected AI ",
"chat_order_tip": "/tip show a tip", "chat_order_tip": "/tip show a tip",
"room_name": "The name of the room is", "room_name": "The name of the room is",
"banned_chat_level1": "You are being banned from chatting.", "banned_chat_tip": "You are being banned from chatting.",
"banned_chat_level2": "You are being banned from the matching system for sending inappropriate messages.", "banned_duel_tip": "You are being banned from the random duel system for sending inappropriate messages.",
"chat_warn_level1": "WARNING: This message is inappropriate.", "chat_warn_level0": "WARNING: Please stop sending inappropriate messages.",
"chat_warn_level2": "WARNING: Your conversation is inappropriate!", "chat_warn_level2": "WARNING: Your conversation is inappropriate!",
"chat_warn_level3": "WARNING: Please stop sending inappropriate messages.", "chat_warn_level1": "WARNING: Please use civilised language.",
"chat_warn_level4": "WARNING: Please use civilised language.", "chat_banned": "is banned from chat.",
"banned_chat_level3": "banned from chat",
"chat_inappropriate": "Your chats have violated the rules.",
"deck_correct_part1": "Your deck", "deck_correct_part1": "Your deck",
"deck_correct_part2": "has passed the deck check for this tournament.", "deck_correct_part2": "has passed the deck check for this tournament.",
"deck_incorrect_part1": "The deck you are using is not the same as your submitted deck", "deck_incorrect_part1": "The deck you are using is not the same as your submitted deck",
"deck_incorrect_part2": ". Please make sure all the cards are in the correct sequence.", "deck_incorrect_part2": ". Please make sure all the cards are in the correct sequence.",
"no_sign_up": ", we did not receive your registration,please make sure you are using the correct ID for the tournament.", "deck_not_found": ", we did not receive your registration,please make sure you are using the correct ID for the tournament.",
"cloud_replay_delay_part1": "The replay code for this duel is ", "cloud_replay_delay_part1": "The replay code for this duel is ",
"cloud_replay_delay_part2": ". It can be accessed after this match.", "cloud_replay_delay_part2": ". It can be accessed after this match.",
"no_action": "no action detected", "afk_warn_part1": "didn't do any action for too long time, and will be removed in ",
"no_action_kick": "removed by the system", "afk_warn_part2": " seconds"
"no_action_warn_part1": "No action detected, you will be removed in ",
"no_action_warn_part2": " seconds",
"incorrect_password": "incorrect password",
"file_not_found": "file not found "
"banned_duel_part1": "Recently, you have committed",
"banned_duel_part2": ", therefore you will only meet players with similar offence within ",
"banned_duel_part3": "."
}, },
"zh-cn": { "zh-cn": {
"kicked_by_system": "被系统请出了房间",
"random_duel_enter_room_waiting": "对手已经在等你了,开始决斗吧!", "random_duel_enter_room_waiting": "对手已经在等你了,开始决斗吧!",
"random_duel_enter_room_new": "已建立随机对战房间,正在等待对手!", "random_duel_enter_room_new": "已建立随机对战房间,正在等待对手!",
"random_duel_enter_room_match": "您进入了比赛模式的房间,我们推荐使用竞技卡组!", "random_duel_enter_room_match": "您进入了比赛模式的房间,我们推荐使用竞技卡组!",
"random_banned_part1": "因为您近期在游戏中多次", "random_banned_part1": "因为您近期在游戏中多次",
"random_banned_part2": ",您已被禁止使用随机对战功能,将在", "random_banned_part2": ",您已被禁止使用随机对战功能,将在",
"random_banned_part3": "后解封", "random_banned_part3": "后解封",
"random_deprecated_part1": "因为您近期在游戏中",
"random_deprecated_part2": ",在",
"random_deprecated_part3": "内您随机对战时只能遇到其他违规玩家。",
"random_warn_part1": "系统检测到您近期在游戏中", "random_warn_part1": "系统检测到您近期在游戏中",
"random_warn_part2": ",若您违规超过3次,将受到惩罚", "random_warn_part2": ",若您违规超过3次,将受到惩罚",
"random_ban_reason_separator": "、",
"random_ban_reason_flee": "强退",
"random_ban_reason_AFK": "挂机",
"random_ban_reason_abuse": "发言违规",
"random_ban_reason_zombie": "挂房间",
"windbot_deck_not_found": "未找到该AI角色或卡组", "windbot_deck_not_found": "未找到该AI角色或卡组",
"windbot_name_too_long": "AI房间名过长,请在建立房间后输入 /ai 来添加AI", "windbot_name_too_long": "AI房间名过长,请在建立房间后输入 /ai 来添加AI",
"duel_room_new_failed": "建立房间失败,请重试", "create_room_failed": "建立房间失败,请重试",
"add_windbot_failed": "添加AI失败,可尝试输入 /ai 重新添加", "add_windbot_failed": "添加AI失败,可尝试输入 /ai 重新添加",
"quit_watch": "退出了观战", "quit_watch": "退出了观战",
"flee": "强退",
"left_game": "离开了游戏", "left_game": "离开了游戏",
"server_closed": "服务器关闭了连接", "server_closed": "服务器关闭了连接",
"server_error": "服务器错误:", "server_error": "服务器错误:",
...@@ -117,60 +120,51 @@ ...@@ -117,60 +120,51 @@
"invalid_password_existed": "主机密码不正确 (Already Existed)", "invalid_password_existed": "主机密码不正确 (Already Existed)",
"invalid_password_not_found": "主机密码不正确 (Not Found)", "invalid_password_not_found": "主机密码不正确 (Not Found)",
"invalid_password_action": "主机密码不正确 (Invalid Action)", "invalid_password_action": "主机密码不正确 (Invalid Action)",
"server_full": "服务器已经爆满,请稍候再试",
"invalid_password_checksum": "主机密码不正确 (Checksum Failed)", "invalid_password_checksum": "主机密码不正确 (Checksum Failed)",
"enter_correct_user": "请输入正确的用户名", "bad_user_name": "请输入正确的用户名",
"client_overload": "同时开启的客户端数量过多 ", "server_full": "服务器已经爆满,请稍候再试",
"too_much_connection": "同时开启的客户端数量过多 ",
"banned_ip_login": "您的账号已被封禁", "banned_ip_login": "您的账号已被封禁",
"banned_user_login": "您的账号已被封禁", "banned_user_login": "您的账号已被封禁",
"bad_name_level3": "您的用户名存在不适当的内容", "bad_name_level3": "您的用户名存在不适当的内容",
"bad_name_level2": "您的用户名存在不适当的内容", "bad_name_level2": "您的用户名存在不适当的内容",
"bad_name_level1": "您的用户名存在不适当的内容,请注意更改", "bad_name_level1": "您的用户名存在不适当的内容,请注意更改",
"invalid_password_room": "房间密码不正确", "invalid_password_room": "房间密码不正确",
"outdated_client": "您的版本号过低,可能出现未知问题,电脑用户请升级版本,YGOMobile用户请等待作者更新", "outdated_client": "您的版本号过低,可能出现未知问题,请升级版本",
"watch_join": "加入了观战", "watch_join": "加入了观战",
"watch_present": "观战中", "watch_watching": "观战中",
"watch_denied": "决斗已开始,不允许观战", "watch_denied": "决斗已开始,不允许观战",
"rank_arena": ",排名第", "rank_arena": ",排名第",
"rank_blank": ",暂无排名", "rank_blank": ",暂无排名",
"exp_value_part1": "你有", "exp_value_part1": "你有",
"exp_value_part2": "点经验", "exp_value_part2": "点经验",
"exp_value_part3": ",你的战斗力是", "exp_value_part3": ",你的战斗力是",
"exp_value_part4": "。正式上线前这些积分可能被重置", "exp_value_part4": "。正式上线前这些积分可能被重置",
"lp_low_level1": "你的生命已经如风中残烛了!", "lp_low_opponent": "你的生命已经如风中残烛了!",
"lp_low_level2": "背水一战!", "lp_low_self": "背水一战!",
"away_from_keyboard": "挂房间",
"kicked_by_player": "被请出了房间", "kicked_by_player": "被请出了房间",
"kicked_by_system_count_down": "秒后房主若不开始游戏将被请出房间", "kicked_by_system": "被系统请出了房间",
"kick_count_down": "秒后房主若不开始游戏将被请出房间",
"chat_order_main": "Mycard YGOPro Server 指令帮助", "chat_order_main": "Mycard YGOPro Server 指令帮助",
"chat_order_help": "/help 显示这个帮助信息", "chat_order_help": "/help 显示这个帮助信息",
"chat_order_roomname": "/roomname 显示当前房间的名字", "chat_order_roomname": "/roomname 显示当前房间的名字",
"chat_order_windbot": "/ai 添加一个AI,/ai 角色名 可指定添加的角色", "chat_order_windbot": "/ai 添加一个AI,/ai 角色名 可指定添加的角色",
"chat_order_tip": "/tip 显示一条提示", "chat_order_tip": "/tip 显示一条提示",
"room_name": "您当前的房间名是", "room_name": "您当前的房间名是",
"banned_chat_level1": "您已被禁言!", "banned_chat_tip": "您已被禁言!",
"banned_chat_level2": "您的发言存在严重不适当的内容,禁止您使用随机对战功能!", "banned_duel_tip": "您的发言存在严重不适当的内容,禁止您使用随机对战功能!",
"chat_warn_level1" : "发言违规", "chat_warn_level0": "请不要发送垃圾信息!",
"chat_warn_level2": "您的发言存在不适当的内容,发送失败!", "chat_warn_level2": "您的发言存在不适当的内容,发送失败!",
"chat_warn_level3": "请不要发送垃圾信息!", "chat_warn_level1": "请使用文明用语!",
"chat_warn_level4": "请使用文明用语!", "chat_banned": "已被禁言!",
"banned_chat_level3": "已被禁言!",
"chat_inappropriate": "发言违规",
"deck_correct_part1": "成功使用卡组", "deck_correct_part1": "成功使用卡组",
"deck_correct_part2": "参加比赛。", "deck_correct_part2": "参加比赛。",
"deck_incorrect_part1": "您的卡组与报名卡组", "deck_incorrect_part1": "您的卡组与报名卡组",
"deck_incorrect_part2": "不符。注意卡组不能有包括卡片顺序在内的任何修改。", "deck_incorrect_part2": "不符。注意卡组不能有包括卡片顺序在内的任何修改。",
"no_sign_up": ",没有找到您的报名信息,请确定您使用昵称与报名ID一致。", "deck_not_found": ",没有找到您的报名信息,请确定您使用昵称与报名ID一致。",
"cloud_replay_delay_part1": "本场比赛云录像:", "cloud_replay_delay_part1": "本场比赛云录像:",
"cloud_replay_delay_part2": "。将于本局结束后可播放。", "cloud_replay_delay_part2": "。将于本局结束后可播放。",
"no_action": "挂机", "afk_warn_part1": "已经很久没有操作了,若继续挂机,将于",
"no_action_kick": "被系统请出了房间", "afk_warn_part2": "秒后被请出房间"
"no_action_warn_part1": "已经很久没有操作了,若继续挂机,将于",
"no_action_warn_part2": "秒后被请出房间",
"incorrect_password": "密码错误",
"file_not_found": "未找到文件 ",
"banned_duel_part1": "因为您近期在游戏中",
"banned_duel_part2": ",在",
"banned_duel_part3": "内您随机对战时只能遇到其他违规玩家。"
} }
} }
\ No newline at end of file
...@@ -206,13 +206,13 @@ ROOM_find_or_create_random = (type, player_ip)-> ...@@ -206,13 +206,13 @@ ROOM_find_or_create_random = (type, player_ip)->
return player_ip == bannedplayer.ip return player_ip == bannedplayer.ip
if bannedplayer if bannedplayer
if bannedplayer.count > 6 and moment() < bannedplayer.time if bannedplayer.count > 6 and moment() < bannedplayer.time
return {"error": "${random_banned_part1}#{bannedplayer.reasons.join('')}${random_banned_part2}#{moment(bannedplayer.time).fromNow(true)}${random_banned_part3}"} return {"error": "${random_banned_part1}#{bannedplayer.reasons.join('${random_ban_reason_separator}')}${random_banned_part2}#{moment(bannedplayer.time).fromNow(true)}${random_banned_part3}"}
if bannedplayer.count > 3 and moment() < bannedplayer.time and bannedplayer.need_tip if bannedplayer.count > 3 and moment() < bannedplayer.time and bannedplayer.need_tip
bannedplayer.need_tip = false bannedplayer.need_tip = false
return {"error": "因为您近期在游戏中#{bannedplayer.reasons.join('、')},在#{moment(bannedplayer.time).fromNow(true)}内您随机对战时只能遇到其他违规玩家"} return {"error": "${random_deprecated_part1}#{bannedplayer.reasons.join('${random_ban_reason_separator}')}${random_deprecated_part2}#{moment(bannedplayer.time).fromNow(true)}${random_deprecated_part3}"}
else if bannedplayer.need_tip else if bannedplayer.need_tip
bannedplayer.need_tip = false bannedplayer.need_tip = false
return {"error": "${random_warn_part1}#{bannedplayer.reasons.join('')}${random_warn_part2}"} return {"error": "${random_warn_part1}#{bannedplayer.reasons.join('${random_ban_reason_separator}')}${random_warn_part2}"}
else if bannedplayer.count > 2 else if bannedplayer.count > 2
bannedplayer.need_tip = true bannedplayer.need_tip = true
max_player = if type == 'T' then 4 else 2 max_player = if type == 'T' then 4 else 2
...@@ -402,7 +402,7 @@ class Room ...@@ -402,7 +402,7 @@ class Room
@process = spawn './ygopro', param, {cwd: 'ygopro'} @process = spawn './ygopro', param, {cwd: 'ygopro'}
@process.on 'error', (err)=> @process.on 'error', (err)=>
_.each @players, (player)-> _.each @players, (player)->
ygopro.stoc_die(player, "${duel_room_new_failed}") ygopro.stoc_die(player, "${create_room_failed}")
this.delete() this.delete()
return return
@process.on 'exit', (code)=> @process.on 'exit', (code)=>
...@@ -434,7 +434,7 @@ class Room ...@@ -434,7 +434,7 @@ class Room
@has_ygopro_error = true @has_ygopro_error = true
return return
catch catch
@error = "${duel_room_new_failed}" @error = "${create_room_failed}"
delete: -> delete: ->
return if @deleted return if @deleted
#log.info 'room-delete', this.name, ROOM_all.length #log.info 'room-delete', this.name, ROOM_all.length
...@@ -572,7 +572,7 @@ class Room ...@@ -572,7 +572,7 @@ class Room
@finished = true @finished = true
@scores[client.name] = -1 @scores[client.name] = -1
if @random_type if @random_type
ROOM_ban_player(client.name, client.ip, "${flee}") ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}")
if @players.length and !(@windbot and client.is_host) if @players.length and !(@windbot and client.is_host)
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 ''
roomlist.update(this) if !@private and !@started and settings.modules.http.websocket_roomlist roomlist.update(this) if !@private and !@started and settings.modules.http.websocket_roomlist
...@@ -1019,11 +1019,11 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1019,11 +1019,11 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
finish(buffer) finish(buffer)
else if !client.name or client.name=="" else if !client.name or client.name==""
ygopro.stoc_die(client, "${enter_correct_user}") ygopro.stoc_die(client, "${bad_user_name}")
else if ROOM_connected_ip[client.ip] > 5 else if ROOM_connected_ip[client.ip] > 5
log.warn("MULTI LOGIN", client.name, client.ip) log.warn("MULTI LOGIN", client.name, client.ip)
ygopro.stoc_die(client, "${client_overload}" + client.ip) ygopro.stoc_die(client, "${too_much_connection}" + client.ip)
else if _.indexOf(settings.ban.banned_user, client.name) > -1 #账号被封 else if _.indexOf(settings.ban.banned_user, client.name) > -1 #账号被封
settings.ban.banned_ip.push(client.ip) settings.ban.banned_ip.push(client.ip)
...@@ -1080,7 +1080,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1080,7 +1080,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
client.is_post_watcher = true client.is_post_watcher = true
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_present}", ygopro.constants.COLORS.BABYBLUE) ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE)
for buffer in room.watcher_buffers for buffer in room.watcher_buffers
client.write buffer client.write buffer
else else
...@@ -1220,7 +1220,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)-> ...@@ -1220,7 +1220,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
val = buffer.readInt32LE(2) val = buffer.readInt32LE(2)
room.dueling_players[pos].lp -= val room.dueling_players[pos].lp -= val
if 0 < room.dueling_players[pos].lp <= 100 if 0 < room.dueling_players[pos].lp <= 100
ygopro.stoc_send_chat_to_room(room, "${lp_low_level1}", ygopro.constants.COLORS.PINK) ygopro.stoc_send_chat_to_room(room, "${lp_low_opponent}", ygopro.constants.COLORS.PINK)
if ygopro.constants.MSG[msg] == 'RECOVER' and client.is_host if ygopro.constants.MSG[msg] == 'RECOVER' and client.is_host
pos = buffer.readUInt8(1) pos = buffer.readUInt8(1)
...@@ -1240,7 +1240,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)-> ...@@ -1240,7 +1240,7 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
val = buffer.readInt32LE(2) val = buffer.readInt32LE(2)
room.dueling_players[pos].lp -= val room.dueling_players[pos].lp -= val
if 0 < room.dueling_players[pos].lp <= 100 if 0 < room.dueling_players[pos].lp <= 100
ygopro.stoc_send_chat_to_room(room, "${lp_low_level2}", ygopro.constants.COLORS.PINK) ygopro.stoc_send_chat_to_room(room, "${lp_low_self}", ygopro.constants.COLORS.PINK)
#登场台词 #登场台词
if settings.modules.dialogues.enabled if settings.modules.dialogues.enabled
...@@ -1260,7 +1260,7 @@ ygopro.ctos_follow 'HS_KICK', true, (buffer, info, client, server)-> ...@@ -1260,7 +1260,7 @@ ygopro.ctos_follow 'HS_KICK', true, (buffer, info, client, server)->
client.kick_count = if client.kick_count then client.kick_count+1 else 1 client.kick_count = if client.kick_count then client.kick_count+1 else 1
if client.kick_count>=5 if client.kick_count>=5
ygopro.stoc_send_chat_to_room(room, "#{client.name} ${kicked_by_system}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{client.name} ${kicked_by_system}", ygopro.constants.COLORS.RED)
ROOM_ban_player(player.name, player.ip, "${zombie_player}") ROOM_ban_player(player.name, player.ip, "${random_ban_reason_zombie}")
client.destroy() client.destroy()
return true return true
ygopro.stoc_send_chat_to_room(room, "#{player.name} ${kicked_by_player}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{player.name} ${kicked_by_player}", ygopro.constants.COLORS.RED)
...@@ -1296,12 +1296,12 @@ wait_room_start = (room, time)-> ...@@ -1296,12 +1296,12 @@ wait_room_start = (room, time)->
time -= 1 time -= 1
if time if time
unless time % 5 unless time % 5
ygopro.stoc_send_chat_to_room(room, "#{if time <= 9 then ' ' else ''}#{time}${kicked_by_system_count_down}", if time <= 9 then ygopro.constants.COLORS.RED else ygopro.constants.COLORS.LIGHTBLUE) ygopro.stoc_send_chat_to_room(room, "#{if time <= 9 then ' ' else ''}#{time}${kick_count_down}", if time <= 9 then ygopro.constants.COLORS.RED else ygopro.constants.COLORS.LIGHTBLUE)
setTimeout (()-> wait_room_start(room, time);return), 1000 setTimeout (()-> wait_room_start(room, time);return), 1000
else else
for player in room.players for player in room.players
if player and player.is_host if player and player.is_host
ROOM_ban_player(player.name, player.ip, "${zombie_player}") ROOM_ban_player(player.name, player.ip, "${random_ban_reason_zombie}")
ygopro.stoc_send_chat_to_room(room, "#{player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED)
player.destroy() player.destroy()
return return
...@@ -1419,7 +1419,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1419,7 +1419,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
return cancel return cancel
if client.abuse_count>=5 if client.abuse_count>=5
log.warn "BANNED CHAT", client.name, client.ip, msg log.warn "BANNED CHAT", client.name, client.ip, msg
ygopro.stoc_send_chat(client, "${banned_chat_level1}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${banned_chat_tip}", ygopro.constants.COLORS.RED)
return true return true
oldmsg = msg oldmsg = msg
if (_.any(settings.ban.badword_level3, (badword) -> if (_.any(settings.ban.badword_level3, (badword) ->
...@@ -1429,9 +1429,9 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1429,9 +1429,9 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
log.warn "BAD WORD LEVEL 3", client.name, client.ip, oldmsg log.warn "BAD WORD LEVEL 3", client.name, client.ip, oldmsg
cancel = true cancel = true
if client.abuse_count>0 if client.abuse_count>0
ygopro.stoc_send_chat(client, "${banned_chat_level2}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${banned_duel_tip}", ygopro.constants.COLORS.RED)
ROOM_ban_player(client.name, client.ip, "${chat_bad}") ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}")
ROOM_ban_player(client.name, client.ip, "${chat_bad}", 3) ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}", 3)
client.destroy() client.destroy()
return true return true
else else
...@@ -1439,12 +1439,12 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1439,12 +1439,12 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
ygopro.stoc_send_chat(client, "${chat_warn_level2}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${chat_warn_level2}", ygopro.constants.COLORS.RED)
else if (client.rag and room.started) else if (client.rag and room.started)
client.rag = false client.rag = false
#ygopro.stoc_send_chat(client, "${chat_warn_level1}", ygopro.constants.COLORS.RED) #ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED)
cancel = true cancel = true
else if (msg.length>100) else if (msg.length>100)
log.warn "SPAM WORD", client.name, client.ip, oldmsg log.warn "SPAM WORD", client.name, client.ip, oldmsg
client.abuse_count=client.abuse_count+2 client.abuse_count=client.abuse_count+2
ygopro.stoc_send_chat(client, "${chat_warn_level3}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED)
cancel = true cancel = true
else if (_.any(settings.ban.spam_word, (badword) -> else if (_.any(settings.ban.spam_word, (badword) ->
regexp = new RegExp(badword, 'i') regexp = new RegExp(badword, 'i')
...@@ -1452,7 +1452,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1452,7 +1452,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
, msg)) , msg))
#log.warn "SPAM WORD", client.name, client.ip, oldmsg #log.warn "SPAM WORD", client.name, client.ip, oldmsg
client.abuse_count=client.abuse_count+2 client.abuse_count=client.abuse_count+2
ygopro.stoc_send_chat(client, "${chat_warn_level3}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED)
cancel = true cancel = true
else if (_.any(settings.ban.badword_level2, (badword) -> else if (_.any(settings.ban.badword_level2, (badword) ->
regexp = new RegExp(badword, 'i') regexp = new RegExp(badword, 'i')
...@@ -1472,7 +1472,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1472,7 +1472,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
if oldmsg != msg if oldmsg != msg
log.warn "BAD WORD LEVEL 1", client.name, client.ip, oldmsg log.warn "BAD WORD LEVEL 1", client.name, client.ip, oldmsg
client.abuse_count=client.abuse_count+1 client.abuse_count=client.abuse_count+1
ygopro.stoc_send_chat(client, "${chat_warn_level4}") ygopro.stoc_send_chat(client, "${chat_warn_level1}")
struct = ygopro.structs["chat"] struct = ygopro.structs["chat"]
struct._setBuff(buffer) struct._setBuff(buffer)
struct.set("msg", msg) struct.set("msg", msg)
...@@ -1483,8 +1483,8 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1483,8 +1483,8 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
, msg)) , msg))
log.info "BAD WORD LEVEL 0", client.name, client.ip, oldmsg log.info "BAD WORD LEVEL 0", client.name, client.ip, oldmsg
if client.abuse_count>=5 if client.abuse_count>=5
ygopro.stoc_send_chat_to_room(room, "#{client.name} ${banned_chat_level3}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{client.name} ${chat_banned}", ygopro.constants.COLORS.RED)
ROOM_ban_player(client.name, client.ip, "${chat_bad}") ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}")
return cancel return cancel
ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server)-> ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server)->
...@@ -1537,7 +1537,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server)-> ...@@ -1537,7 +1537,7 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server)->
ygopro.stoc_send_chat(client, "${deck_incorrect_part1} #{found_deck} ${deck_incorrect_part2}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "${deck_incorrect_part1} #{found_deck} ${deck_incorrect_part2}", ygopro.constants.COLORS.RED)
else else
#log.info("player deck not found: " + client.name) #log.info("player deck not found: " + client.name)
ygopro.stoc_send_chat(client, "#{client.name}${no_sign_up}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, "#{client.name}${deck_not_found}", ygopro.constants.COLORS.RED)
return false return false
ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)-> ygopro.ctos_follow 'RESPONSE', false, (buffer, info, client, server)->
...@@ -1628,11 +1628,11 @@ if settings.modules.random_duel.enabled ...@@ -1628,11 +1628,11 @@ if settings.modules.random_duel.enabled
#log.info time_passed #log.info time_passed
if time_passed >= settings.modules.random_duel.hang_timeout if time_passed >= settings.modules.random_duel.hang_timeout
room.last_active_time = moment() room.last_active_time = moment()
ROOM_ban_player(room.waiting_for_player.name, room.waiting_for_player.ip, "${no_action}") ROOM_ban_player(room.waiting_for_player.name, room.waiting_for_player.ip, "${random_ban_reason_AFK}")
ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${no_action_kick}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${kicked_by_system}", ygopro.constants.COLORS.RED)
room.waiting_for_player.server.destroy() room.waiting_for_player.server.destroy()
else if time_passed >= (settings.modules.random_duel.hang_timeout - 20) and not (time_passed % 10) else if time_passed >= (settings.modules.random_duel.hang_timeout - 20) and not (time_passed % 10)
ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${no_action_warn_part1}#{settings.modules.random_duel.hang_timeout - time_passed}${no_action_warn_part2}", ygopro.constants.COLORS.RED) ygopro.stoc_send_chat_to_room(room, "#{room.waiting_for_player.name} ${afk_warn_part1}#{settings.modules.random_duel.hang_timeout - time_passed}${afk_warn_part2}", ygopro.constants.COLORS.RED)
return return
, 1000 , 1000
......
...@@ -287,18 +287,18 @@ ...@@ -287,18 +287,18 @@
if (bannedplayer) { if (bannedplayer) {
if (bannedplayer.count > 6 && moment() < bannedplayer.time) { if (bannedplayer.count > 6 && moment() < bannedplayer.time) {
return { return {
"error": "${random_banned_part1}" + (bannedplayer.reasons.join('')) + "${random_banned_part2}" + (moment(bannedplayer.time).fromNow(true)) + "${random_banned_part3}" "error": "${random_banned_part1}" + (bannedplayer.reasons.join('${random_ban_reason_separator}')) + "${random_banned_part2}" + (moment(bannedplayer.time).fromNow(true)) + "${random_banned_part3}"
}; };
} }
if (bannedplayer.count > 3 && moment() < bannedplayer.time && bannedplayer.need_tip) { if (bannedplayer.count > 3 && moment() < bannedplayer.time && bannedplayer.need_tip) {
bannedplayer.need_tip = false; bannedplayer.need_tip = false;
return { return {
"error": "因为您近期在游戏中" + (bannedplayer.reasons.join('')) + ",在" + (moment(bannedplayer.time).fromNow(true)) + "内您随机对战时只能遇到其他违规玩家" "error": "${random_deprecated_part1}" + (bannedplayer.reasons.join('${random_ban_reason_separator}')) + "${random_deprecated_part2}" + (moment(bannedplayer.time).fromNow(true)) + "${random_deprecated_part3}"
}; };
} else if (bannedplayer.need_tip) { } else if (bannedplayer.need_tip) {
bannedplayer.need_tip = false; bannedplayer.need_tip = false;
return { return {
"error": "${random_warn_part1}" + (bannedplayer.reasons.join('')) + "${random_warn_part2}" "error": "${random_warn_part1}" + (bannedplayer.reasons.join('${random_ban_reason_separator}')) + "${random_warn_part2}"
}; };
} else if (bannedplayer.count > 2) { } else if (bannedplayer.count > 2) {
bannedplayer.need_tip = true; bannedplayer.need_tip = true;
...@@ -533,7 +533,7 @@ ...@@ -533,7 +533,7 @@
this.process.on('error', (function(_this) { this.process.on('error', (function(_this) {
return function(err) { return function(err) {
_.each(_this.players, function(player) { _.each(_this.players, function(player) {
return ygopro.stoc_die(player, "${duel_room_new_failed}"); return ygopro.stoc_die(player, "${create_room_failed}");
}); });
_this["delete"](); _this["delete"]();
}; };
...@@ -583,7 +583,7 @@ ...@@ -583,7 +583,7 @@
}; };
})(this)); })(this));
} catch (error1) { } catch (error1) {
this.error = "${duel_room_new_failed}"; this.error = "${create_room_failed}";
} }
} }
...@@ -765,7 +765,7 @@ ...@@ -765,7 +765,7 @@
this.finished = true; this.finished = true;
this.scores[client.name] = -1; this.scores[client.name] = -1;
if (this.random_type) { if (this.random_type) {
ROOM_ban_player(client.name, client.ip, "${flee}"); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_flee}");
} }
} }
if (this.players.length && !(this.windbot && client.is_host)) { if (this.players.length && !(this.windbot && client.is_host)) {
...@@ -1249,10 +1249,10 @@ ...@@ -1249,10 +1249,10 @@
return finish(buffer); return finish(buffer);
}); });
} else if (!client.name || client.name === "") { } else if (!client.name || client.name === "") {
ygopro.stoc_die(client, "${enter_correct_user}"); ygopro.stoc_die(client, "${bad_user_name}");
} else if (ROOM_connected_ip[client.ip] > 5) { } else if (ROOM_connected_ip[client.ip] > 5) {
log.warn("MULTI LOGIN", client.name, client.ip); log.warn("MULTI LOGIN", client.name, client.ip);
ygopro.stoc_die(client, "${client_overload}" + client.ip); ygopro.stoc_die(client, "${too_much_connection}" + client.ip);
} else if (_.indexOf(settings.ban.banned_user, client.name) > -1) { } else if (_.indexOf(settings.ban.banned_user, client.name) > -1) {
settings.ban.banned_ip.push(client.ip); settings.ban.banned_ip.push(client.ip);
log.warn("BANNED USER LOGIN", client.name, client.ip); log.warn("BANNED USER LOGIN", client.name, client.ip);
...@@ -1303,7 +1303,7 @@ ...@@ -1303,7 +1303,7 @@
client.is_post_watcher = true; client.is_post_watcher = true;
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_present}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${watch_watching}", ygopro.constants.COLORS.BABYBLUE);
ref1 = room.watcher_buffers; ref1 = room.watcher_buffers;
for (l = 0, len1 = ref1.length; l < len1; l++) { for (l = 0, len1 = ref1.length; l < len1; l++) {
buffer = ref1[l]; buffer = ref1[l];
...@@ -1458,7 +1458,7 @@ ...@@ -1458,7 +1458,7 @@
val = buffer.readInt32LE(2); val = buffer.readInt32LE(2);
room.dueling_players[pos].lp -= val; room.dueling_players[pos].lp -= val;
if ((0 < (ref = room.dueling_players[pos].lp) && ref <= 100)) { if ((0 < (ref = room.dueling_players[pos].lp) && ref <= 100)) {
ygopro.stoc_send_chat_to_room(room, "${lp_low_level1}", ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, "${lp_low_opponent}", ygopro.constants.COLORS.PINK);
} }
} }
if (ygopro.constants.MSG[msg] === 'RECOVER' && client.is_host) { if (ygopro.constants.MSG[msg] === 'RECOVER' && client.is_host) {
...@@ -1485,7 +1485,7 @@ ...@@ -1485,7 +1485,7 @@
val = buffer.readInt32LE(2); val = buffer.readInt32LE(2);
room.dueling_players[pos].lp -= val; room.dueling_players[pos].lp -= val;
if ((0 < (ref1 = room.dueling_players[pos].lp) && ref1 <= 100)) { if ((0 < (ref1 = room.dueling_players[pos].lp) && ref1 <= 100)) {
ygopro.stoc_send_chat_to_room(room, "${lp_low_level2}", ygopro.constants.COLORS.PINK); ygopro.stoc_send_chat_to_room(room, "${lp_low_self}", ygopro.constants.COLORS.PINK);
} }
} }
if (settings.modules.dialogues.enabled) { if (settings.modules.dialogues.enabled) {
...@@ -1515,7 +1515,7 @@ ...@@ -1515,7 +1515,7 @@
client.kick_count = client.kick_count ? client.kick_count + 1 : 1; client.kick_count = client.kick_count ? client.kick_count + 1 : 1;
if (client.kick_count >= 5) { if (client.kick_count >= 5) {
ygopro.stoc_send_chat_to_room(room, client.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, client.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED);
ROOM_ban_player(player.name, player.ip, "${zombie_player}"); ROOM_ban_player(player.name, player.ip, "${random_ban_reason_zombie}");
client.destroy(); client.destroy();
return true; return true;
} }
...@@ -1567,7 +1567,7 @@ ...@@ -1567,7 +1567,7 @@
time -= 1; time -= 1;
if (time) { if (time) {
if (!(time % 5)) { if (!(time % 5)) {
ygopro.stoc_send_chat_to_room(room, "" + (time <= 9 ? ' ' : '') + time + "${kicked_by_system_count_down}", time <= 9 ? ygopro.constants.COLORS.RED : ygopro.constants.COLORS.LIGHTBLUE); ygopro.stoc_send_chat_to_room(room, "" + (time <= 9 ? ' ' : '') + time + "${kick_count_down}", time <= 9 ? ygopro.constants.COLORS.RED : ygopro.constants.COLORS.LIGHTBLUE);
} }
setTimeout((function() { setTimeout((function() {
wait_room_start(room, time); wait_room_start(room, time);
...@@ -1577,7 +1577,7 @@ ...@@ -1577,7 +1577,7 @@
for (k = 0, len = ref.length; k < len; k++) { for (k = 0, len = ref.length; k < len; k++) {
player = ref[k]; player = ref[k];
if (player && player.is_host) { if (player && player.is_host) {
ROOM_ban_player(player.name, player.ip, "${zombie_player}"); ROOM_ban_player(player.name, player.ip, "${random_ban_reason_zombie}");
ygopro.stoc_send_chat_to_room(room, player.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, player.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED);
player.destroy(); player.destroy();
} }
...@@ -1751,7 +1751,7 @@ ...@@ -1751,7 +1751,7 @@
} }
if (client.abuse_count >= 5) { if (client.abuse_count >= 5) {
log.warn("BANNED CHAT", client.name, client.ip, msg); log.warn("BANNED CHAT", client.name, client.ip, msg);
ygopro.stoc_send_chat(client, "${banned_chat_level1}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${banned_chat_tip}", ygopro.constants.COLORS.RED);
return true; return true;
} }
oldmsg = msg; oldmsg = msg;
...@@ -1763,9 +1763,9 @@ ...@@ -1763,9 +1763,9 @@
log.warn("BAD WORD LEVEL 3", client.name, client.ip, oldmsg); log.warn("BAD WORD LEVEL 3", client.name, client.ip, oldmsg);
cancel = true; cancel = true;
if (client.abuse_count > 0) { if (client.abuse_count > 0) {
ygopro.stoc_send_chat(client, "${banned_chat_level2}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${banned_duel_tip}", ygopro.constants.COLORS.RED);
ROOM_ban_player(client.name, client.ip, "${chat_bad}"); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}");
ROOM_ban_player(client.name, client.ip, "${chat_bad}", 3); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}", 3);
client.destroy(); client.destroy();
return true; return true;
} else { } else {
...@@ -1778,7 +1778,7 @@ ...@@ -1778,7 +1778,7 @@
} else if (msg.length > 100) { } else if (msg.length > 100) {
log.warn("SPAM WORD", client.name, client.ip, oldmsg); log.warn("SPAM WORD", client.name, client.ip, oldmsg);
client.abuse_count = client.abuse_count + 2; client.abuse_count = client.abuse_count + 2;
ygopro.stoc_send_chat(client, "${chat_warn_level3}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED);
cancel = true; cancel = true;
} else if (_.any(settings.ban.spam_word, function(badword) { } else if (_.any(settings.ban.spam_word, function(badword) {
var regexp; var regexp;
...@@ -1786,7 +1786,7 @@ ...@@ -1786,7 +1786,7 @@
return msg.match(regexp); return msg.match(regexp);
}, msg)) { }, msg)) {
client.abuse_count = client.abuse_count + 2; client.abuse_count = client.abuse_count + 2;
ygopro.stoc_send_chat(client, "${chat_warn_level3}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED);
cancel = true; cancel = true;
} else if (_.any(settings.ban.badword_level2, function(badword) { } else if (_.any(settings.ban.badword_level2, function(badword) {
var regexp; var regexp;
...@@ -1806,7 +1806,7 @@ ...@@ -1806,7 +1806,7 @@
if (oldmsg !== msg) { if (oldmsg !== msg) {
log.warn("BAD WORD LEVEL 1", client.name, client.ip, oldmsg); log.warn("BAD WORD LEVEL 1", client.name, client.ip, oldmsg);
client.abuse_count = client.abuse_count + 1; client.abuse_count = client.abuse_count + 1;
ygopro.stoc_send_chat(client, "${chat_warn_level4}"); ygopro.stoc_send_chat(client, "${chat_warn_level1}");
struct = ygopro.structs["chat"]; struct = ygopro.structs["chat"];
struct._setBuff(buffer); struct._setBuff(buffer);
struct.set("msg", msg); struct.set("msg", msg);
...@@ -1820,8 +1820,8 @@ ...@@ -1820,8 +1820,8 @@
} }
} }
if (client.abuse_count >= 5) { if (client.abuse_count >= 5) {
ygopro.stoc_send_chat_to_room(room, client.name + " ${banned_chat_level3}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, client.name + " ${chat_banned}", ygopro.constants.COLORS.RED);
ROOM_ban_player(client.name, client.ip, "${chat_bad}"); ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}");
} }
return cancel; return cancel;
}); });
...@@ -1902,7 +1902,7 @@ ...@@ -1902,7 +1902,7 @@
ygopro.stoc_send_chat(client, "${deck_incorrect_part1} " + found_deck + " ${deck_incorrect_part2}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${deck_incorrect_part1} " + found_deck + " ${deck_incorrect_part2}", ygopro.constants.COLORS.RED);
} }
} else { } else {
ygopro.stoc_send_chat(client, client.name + "${no_sign_up}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, client.name + "${deck_not_found}", ygopro.constants.COLORS.RED);
} }
} }
return false; return false;
...@@ -2043,11 +2043,11 @@ ...@@ -2043,11 +2043,11 @@
time_passed = Math.floor((moment() - room.last_active_time) / 1000); time_passed = Math.floor((moment() - room.last_active_time) / 1000);
if (time_passed >= settings.modules.random_duel.hang_timeout) { if (time_passed >= settings.modules.random_duel.hang_timeout) {
room.last_active_time = moment(); room.last_active_time = moment();
ROOM_ban_player(room.waiting_for_player.name, room.waiting_for_player.ip, "${no_action}"); ROOM_ban_player(room.waiting_for_player.name, room.waiting_for_player.ip, "${random_ban_reason_AFK}");
ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${no_action_kick}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${kicked_by_system}", ygopro.constants.COLORS.RED);
room.waiting_for_player.server.destroy(); room.waiting_for_player.server.destroy();
} else if (time_passed >= (settings.modules.random_duel.hang_timeout - 20) && !(time_passed % 10)) { } else if (time_passed >= (settings.modules.random_duel.hang_timeout - 20) && !(time_passed % 10)) {
ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${no_action_warn_part1}" + (settings.modules.random_duel.hang_timeout - time_passed) + "${no_action_warn_part2}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat_to_room(room, room.waiting_for_player.name + " ${afk_warn_part1}" + (settings.modules.random_duel.hang_timeout - time_passed) + "${afk_warn_part2}", ygopro.constants.COLORS.RED);
} }
} }
}, 1000); }, 1000);
......
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