Skip to content

Commit

Permalink
Stop erroring on unsupported log types.
Browse files Browse the repository at this point in the history
There are certain log types which appeared after the UCP migration
(mostly logs from Gamepedia-specific extensions) and these messages
were flooding our logs. Errors related to these logs should no longer
appear, and an issue will be made to support these log types.

In addition to that, the part of the code that handles situations where
UCP was not relaying a wiki URL has been removed, as the relevant bug
has been fixed on Fandom's side.
  • Loading branch information
KockaAdmiralac committed Sep 3, 2022
1 parent b0fab46 commit 3f2a988
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions include/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ HANDLED_COMMANDS = [
FETCH_MAX_RETRIES = 5,
FETCH_DELAY = 10000;

const IGNORED_LOGS = [
'ro-tournament',
'ro-news',
'curseprofile',
'review',
'thanks',
'cargo',
'import',
'merge',
'tournamentpurge'
];

/**
* IRC client class.
*/
Expand Down Expand Up @@ -297,25 +309,7 @@ class Client {
}
this._overflow = '';
}
// This is a UCP bug where the URL isn't included in log messages.
if (msg && !msg.wiki) {
/*
* You might want to use this for debugging:
*if (
* msg.error &&
* ![
* 'ro-tournament',
* 'ro-news',
* 'curseprofile',
* 'review',
* 'thanks',
* 'cargo',
* 'import'
* ].includes(msg.log)
*) {
* console.info(msg.toJSON());
*}
*/
if (msg && msg.error && IGNORED_LOGS.includes(msg.log)) {
return null;
}
return msg;
Expand Down

0 comments on commit 3f2a988

Please sign in to comment.