mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2025-12-06 02:30:37 -08:00
Fix wegame filter
This commit is contained in:
parent
e9db892399
commit
2e245bda91
1 changed files with 4 additions and 1 deletions
|
|
@ -48,9 +48,12 @@ function init(isDev) {
|
|||
function listen() {
|
||||
console.log("wegame: listen");
|
||||
ipcMain.handle("profanity-check", async (event, data) => {
|
||||
if (data.length === 0) {
|
||||
return "";
|
||||
}
|
||||
const result = railsdk.RailUtils.DirtyWordsFilter(data, true);
|
||||
if (result.check_result.dirty_type !== 0 /** kRailDirtyWordsTypeNormalAllowWords */) {
|
||||
return result.check_result;
|
||||
return result.check_result.replace_string;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue