Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrepol742 committed Apr 18, 2024
1 parent 23a3ea0 commit 5502a55
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,10 @@ function main(fca_state, login, cb) {
});
}

// check if thread lock didnt exists
if (!settingsThread[event.threadID].lock) {
// apply thread lock from the first bot
settingsThread[event.threadID]["lock"] = redfox.getCurrentUserID();
utils.log("thread_lock " + event.threadID + " to " + redfox.getCurrentUserID());
}
const threadLock = settingsThread[event.threadID].lock;

// check if thread lock exists and is not equal to current bot id
// then return
/*
const threadLock = settingsThread[event.threadID].lock;
if (threadLock && threadLock != redfox.getCurrentUserID()) {
if (accounts.includes(threadLock)) return;
for (let threads in settingsThread) {
Expand All @@ -536,7 +529,13 @@ function main(fca_state, login, cb) {
}
}
}
*/

// check if thread lock didnt exists
if (!threadLock) {
// apply thread lock from the first bot
settingsThread[event.threadID]["lock"] = redfox.getCurrentUserID();
utils.log("thread_lock " + event.threadID + " to " + redfox.getCurrentUserID());
}
}

if ((event.type == "message" || event.type == "message_reply") && event.senderID == redfox.getCurrentUserID()) {
Expand Down

0 comments on commit 5502a55

Please sign in to comment.