Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Conversation

@frobinsonj
Copy link
Contributor

@frobinsonj frobinsonj commented Sep 10, 2022

This PR adds a new type (custom) to the ban list imports. The purpose of this change is to allow for partnered organisations to include the date a user was banned in their data. It may also allow for further data to be shared in the future through simple changes.

Sharing the date of the ban is currently only possible when using BattleMetrics, since OWI's ban.cfg format does not have a creation date.

Below is the format expected for the custom ban list type. It is indented to be simple enough that any source of data may be easily transformed to match.

Ban Type:

{
    steamID: string, // Steam ID 64 e.g. 76561198115085734
    created?: string, // Optional Date e.g. "2022-09-07T18:01:33.850Z"
    expires?: string, // Optional Date e.g. "2022-10-07T18:01:33.850Z",
    reason: string // The ban reason
}

steamID and reason are required for a ban to be added. created and expires may be omitted or set to null. All dates should be provided in the ISO 8601 format.

Example JSON response:
https://api.6thab.gg/public/bans2 (feel free to use this for testing)

[
  {
    "steamID": "76561198115085734",
    "created": "2022-09-07T18:01:33.850Z",
    "expires": "2022-10-07T18:01:33.850Z",
    "reason": "Ban reason"
  },
  ...
]

This PR is only for ban imports, not exports.

Copy link
Contributor

@werewolfboy13 werewolfboy13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been tested locally to see if the ban list will work with the importer?

Also the class name will need to be changed, will also need to see the DB structure allows this.

case 'battlemetrics':
await this.fetchBattlemetricsBanList(banList);
break;
case 'custom':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pick a different name for this please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants