Commit 98264569 authored by nanahira's avatar nanahira

Merge branch 'mc'

parents 6f99491a cb9fe5df
import { Struct } from "./struct";
import fs from "fs";
import _ from "underscore";
import structs_declaration from "./data/structs.json";
import typedefs from "./data/typedefs.json";
......
......@@ -25,6 +25,7 @@
"tag_duel_surrender": true,
"replay_delay": false,
"hide_name": false,
"display_watchers": true,
"i18n": {
"auto_pick": false,
"default": "zh-cn",
......
......@@ -3459,6 +3459,9 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro.stoc_send_chat(client, "${chat_warn_level0}", ygopro.constants.COLORS.RED)
cancel = true
if !(room and (room.random_type or room.arena))
if !cancel and settings.modules.display_watchers and client.is_post_watcher
ygopro.stoc_send_chat_to_room(room, "#{client.name}: #{msg}", 9)
return true
return cancel
if client.abuse_count>=5 or CLIENT_is_banned_by_mc(client)
log.warn "BANNED CHAT", client.name, client.ip, msg
......@@ -3530,6 +3533,9 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
if client.abuse_count>=5
ygopro.stoc_send_chat_to_room(room, "#{client.name} ${chat_banned}", ygopro.constants.COLORS.RED)
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}")
if !cancel and settings.modules.display_watchers and client.is_post_watcher
ygopro.stoc_send_chat_to_room(room, "#{client.name}: #{msg}", 9)
return true
await return cancel
ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
......
......@@ -4654,6 +4654,10 @@
cancel = true;
}
if (!(room && (room.random_type || room.arena))) {
if (!cancel && settings.modules.display_watchers && client.is_post_watcher) {
ygopro.stoc_send_chat_to_room(room, `${client.name}: ${msg}`, 9);
return true;
}
return cancel;
}
if (client.abuse_count >= 5 || CLIENT_is_banned_by_mc(client)) {
......@@ -4736,6 +4740,10 @@
ygopro.stoc_send_chat_to_room(room, `${client.name} \${chat_banned}`, ygopro.constants.COLORS.RED);
ROOM_ban_player(client.name, client.ip, "${random_ban_reason_abuse}");
}
if (!cancel && settings.modules.display_watchers && client.is_post_watcher) {
ygopro.stoc_send_chat_to_room(room, `${client.name}: ${msg}`, 9);
return true;
}
return cancel;
});
......
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