Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Only initialize log monitor if Trade Helper is enabled in settings #33

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ class XenonTrade {
* Initializes listeners for Path of Exile log file
*/
initializePoeLogMonitor(logfile = config.get("tradehelper.logfile")) {
if (config.get("tradehelper.enabled") && fs.existsSync(logfile) && logfile.includes("Client.txt")) {
if (!config.get("tradehelper.enabled")) {
return;
}

if (fs.existsSync(logfile) && logfile.includes("Client.txt")) {
// Remove old listeners
if(poeLog != null) {
poeLog.pause();
Expand Down