Skip to content

Commit

Permalink
Merge pull request #49 from cmd1152/main
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
xjzh123 authored Mar 29, 2024
2 parents d782328 + 686fb09 commit 74e4203
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/fast_know_kick_me/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
var checkString = false
var joined = false
hook.register('before','pushmessage', (args) =>{
if (args.cmd == "onlineSet") joined = true
if (args.cmd == "warn" && args.text == 'Unknown command: /y' && checkString) {
checkString = false
return false;
}
})
setInterval(()=>{
if (ws.readyState != 1 || checkString) return;
if (ws.readyState != 1 || checkString || !joined) {
joined = false;
return;
}
checkString = true;
ws.send(JSON.stringify({
cmd: 'chat',
Expand Down

0 comments on commit 74e4203

Please sign in to comment.