pastebindetect
This commit is contained in:
parent
9273316fe9
commit
c6f33a1c1f
2 changed files with 32 additions and 0 deletions
31
src/logs.ts
31
src/logs.ts
|
@ -97,6 +97,27 @@ const macOSNSWindowAnalyzer: analyzer = async (text) => {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const quiltFabricInternalsAnalyzer: analyzer = async (text) => {
|
||||||
|
const base = 'Caused by: java.lang.ClassNotFoundException: ';
|
||||||
|
if (
|
||||||
|
text.includes(base + 'net.fabricmc.fabric.impl') ||
|
||||||
|
text.includes(base + 'net.fabricmc.fabric.mixin') ||
|
||||||
|
text.includes(base + 'net.fabricmc.loader.impl') ||
|
||||||
|
text.includes(base + 'net.fabricmc.loader.mixin') ||
|
||||||
|
text.includes(
|
||||||
|
'org.quiltmc.loader.impl.FormattedException: java.lang.NoSuchMethodError:'
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return [
|
||||||
|
'Fabric Internal Access',
|
||||||
|
`The mod you are using is using fabric internals that are not meant to be used by anything but the loader itself.
|
||||||
|
Those mods break both on Quilt and with fabric updates.
|
||||||
|
If you're using fabric, downgrade your fabric loader could work, on Quilt you can try updating to the latest beta version, but there's nothing much to do unless the mod author stops using them.`,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
const analyzers: analyzer[] = [
|
const analyzers: analyzer[] = [
|
||||||
javaAnalyzer,
|
javaAnalyzer,
|
||||||
versionAnalyzer,
|
versionAnalyzer,
|
||||||
|
@ -104,6 +125,7 @@ const analyzers: analyzer[] = [
|
||||||
forgeJavaAnalyzer,
|
forgeJavaAnalyzer,
|
||||||
intelHDAnalyzer,
|
intelHDAnalyzer,
|
||||||
macOSNSWindowAnalyzer,
|
macOSNSWindowAnalyzer,
|
||||||
|
quiltFabricInternalsAnalyzer,
|
||||||
];
|
];
|
||||||
|
|
||||||
const providers: logProvider[] = [
|
const providers: logProvider[] = [
|
||||||
|
@ -114,6 +136,15 @@ const providers: logProvider[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
export async function parseLog(s: string): Promise<MessageEmbed | null> {
|
export async function parseLog(s: string): Promise<MessageEmbed | null> {
|
||||||
|
if (s.includes('https://pastebin.com/')) {
|
||||||
|
const embed = new MessageEmbed()
|
||||||
|
.setTitle('pastebin.com detected')
|
||||||
|
.setDescription(
|
||||||
|
'Please use https://mclo.gs or another paste provider and send logs using the Log Upload feature in PolyMC. (See !log)'
|
||||||
|
)
|
||||||
|
.setColor('DARK_RED');
|
||||||
|
return embed;
|
||||||
|
}
|
||||||
let log: string = '';
|
let log: string = '';
|
||||||
for (let i in providers) {
|
for (let i in providers) {
|
||||||
const provider = providers[i];
|
const provider = providers[i];
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "log",
|
"name": "log",
|
||||||
|
"aliases": ["sendlog", "log"],
|
||||||
"text": "Please send logs: https://cdn.discordapp.com/attachments/981957331430539267/983680253367058452/1.png https://cdn.discordapp.com/attachments/981957331430539267/983680253715165234/2.png"
|
"text": "Please send logs: https://cdn.discordapp.com/attachments/981957331430539267/983680253367058452/1.png https://cdn.discordapp.com/attachments/981957331430539267/983680253715165234/2.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue