-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: IThundxr <contact@ithundxr.dev>
- Loading branch information
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import { Analyzer } from '../handlers/log.handler'; | ||
|
||
export const optifineAnalyzer: Analyzer = async (log) => { | ||
const matchesOptifine = log.mods | ||
? log.mods.has('optifine') | ||
: log.content.match(/f_174747_/); | ||
const matchesOptifine = log.content.match( | ||
/Optifine Has been detected, Disabled Warning Status: (true|false)/ | ||
); | ||
|
||
if (matchesOptifine) { | ||
return { | ||
name: 'Incompatible with OptiFine', | ||
value: "OptiFine breaks Steam 'n' Rails and is Incompatible\n\nCheck `/tag optifine` for more info & alternatives you can use.", | ||
}; | ||
if (matchesOptifine?.[1] == 'true') { | ||
return { | ||
name: 'Optifine Warning Disabled', | ||
value: 'You appeared to have disabled the Optifine warning. Many issues you might encounter are caused by Optifine. You will most likely get any support due to this.', | ||
}; | ||
} else { | ||
return { | ||
name: 'Incompatible with OptiFine', | ||
value: "OptiFine breaks Steam 'n' Rails and is Incompatible\n\nCheck `/tag optifine` for more info & alternatives you can use.", | ||
}; | ||
} | ||
} | ||
return null; | ||
}; |