Skip to content

Commit

Permalink
remove now-unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jesopo committed Aug 15, 2022
1 parent 5e0d752 commit 7b20d39
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/protections/WordList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,6 @@ export class WordList extends Protection {
const matches = message.match(this.badWords!);
if (matches) {
return new Consequence({ban: true, redact: true, reason: `bad word: ${matches[0]}`})

/*
await mjolnir.logMessage(LogLevel.WARN, "WordList", `Banning ${event['sender']} for word list violation in ${roomId}.`);
if (!mjolnir.config.noop) {
await mjolnir.client.banUser(event['sender'], roomId, "Word list violation");
} else {
await mjolnir.logMessage(LogLevel.WARN, "WordList", `Tried to ban ${event['sender']} in ${roomId} but Mjolnir is running in no-op mode`, roomId);
}
// Redact the event
if (!mjolnir.config.noop) {
await mjolnir.client.redactEvent(roomId, event['event_id'], "spam");
} else {
await mjolnir.logMessage(LogLevel.WARN, "WordList", `Tried to redact ${event['event_id']} in ${roomId} but Mjolnir is running in no-op mode`, roomId);
}
*/
}
}
}
Expand Down

0 comments on commit 7b20d39

Please sign in to comment.