{"id":20118445,"url":"https://github.com/magicoflolis/squadjs-watchdog","last_synced_at":"2025-06-12T20:03:47.920Z","repository":{"id":236676625,"uuid":"792947616","full_name":"magicoflolis/SquadJS-Watchdog","owner":"magicoflolis","description":"The most advanced content filter in SquadJS","archived":false,"fork":false,"pushed_at":"2024-04-30T22:25:06.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T02:52:44.971Z","etag":null,"topics":["squadjs","squadjs-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicoflolis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-28T02:09:25.000Z","updated_at":"2024-12-23T23:00:01.000Z","dependencies_parsed_at":"2024-04-30T23:33:54.827Z","dependency_job_id":null,"html_url":"https://github.com/magicoflolis/SquadJS-Watchdog","commit_stats":null,"previous_names":["magicoflolis/squadjs-watchdog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-Watchdog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-Watchdog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-Watchdog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJS-Watchdog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicoflolis","download_url":"https://codeload.github.com/magicoflolis/SquadJS-Watchdog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241564445,"owners_count":19982958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["squadjs","squadjs-plugin"],"created_at":"2024-11-13T19:10:50.975Z","updated_at":"2025-03-02T19:42:45.598Z","avatar_url":"https://github.com/magicoflolis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SquadJS-Watchdog\n\n\u003e [!IMPORTANT]\n\u003e Watchdog is **VERY** fast!\n\u003e\n\u003e **Watchdog bans are processed faster than BattleMetrics RCON console!**\n\u003e\n\u003e _If player is banned/kicked for something in chat, it won't appear in BattleMetrics!_\n\n[![GitHub License](https://img.shields.io/github/license/magicoflolis/SquadJS-Watchdog?style=flat-square)](https://github.com/magicoflolis/SquadJS-Watchdog/blob/main/LICENSE)\n[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/magicoflolis/SquadJS-Watchdog?style=flat-square)](https://github.com/magicoflolis/SquadJS-Watchdog/issues)\n\nThe most advanced content filter in SquadJS. For any issues, see [issue tracker](https://github.com/magicoflolis/SquadJS-Watchdog/issues).\n\nWatchdog is a plugin designed to filter any and all _unwanted_ content a player might enter in chat, squad name, or username. Currently there are **two** different editions.\n\n## Pre-requirements\n\n- Requires setting up a Discord bot.\n\nTo avoid running into issues, the `Watchdog-base-plugin.js` **must** be excluded from loading as a plugin. This requires modifying the default plugin loader, `/squad-server/plugins/index.js`.\n\n**Recommended Method:**\n\n- Replace your `/squad-server/plugins/index.js` with the one found in this repo.\n  - **This uses a different plugin loading method.**\n\n**Alternative Method:**\n\n- From this repo, copy `/squad-server/plugins/index.js.disabled` to your `/squad-server/plugins`.\n- Remove the old `index.js` file.\n- Rename `index.js.disabled` to `index.js`.\n\n**Manual Method:**\n\n- Add `Watchdog-base-plugin.js` to line: 31 in `/squad-server/plugins/index.js`.\n\n## Watchdog\n\n\u003e Anything with `?` at the end means it is **optional** and can be removed from the config.\n\nThis is the base plugin known as \"watchdog\", it comes with a ton of utility functions and is made to be extended upon!\n\n**Options:**\n\n- `discordClient` - Discord client\n- `action` - Auto mod feature and global action trigger.\n  - If `none`, watchdog will only log detected content in discord.\n  - If `ban`, watchdog will log detected content in discord then take this action on the player.\n  - If `kick`, watchdog will log detected content in discord then take this action on the player.\n  - Default is `none`.\n- `channelID?` - Works the exact same way as default method.\n- `channelIDs?` - An array of channelIDs, this allows you to connect to multiple discord channels under the same plugin!\n  - If you don't care to use this feature, input a channelID how you normally would.\n- `playerNames` - Define acceptable player names.\n  - `action` - Same as global action option listed above.\n  - `alphabet` - Alphabet of the language you wish for players to have in there names, basic english characters are the default.\n  - `extends` - Extend alphabet system listed above, good if you wish to keep default and extend upon it.\n  - `minimum` - The minimum requirements for a player name to have, default is 0 which means a player name must include any characters from `alphabet` or `extends` otherwise the `playerNames:action` is triggered.\n    - Example: If set to 3 and a player with the name `AB` joins, the `playerNames:action` is triggered.\n- `embedFormat?` - Format player info in embed messages.\n- `profanity?` - An array of words you wish not for players to use in chat, player name, or squad name, if found triggers global action.\n- `lineBreaks?` - Specify \"spaces\", used in `this.getData().clean`\n  - **Not recommended changing from defaults**\n- `ignorePoints?` - Specify ignore characters, used in `this.getData().clean` and `this.getData().data`\n  - **Not recommended changing from defaults**\n\n**Base `config.json`:**\n\n```json\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"WatchdogBase\",\n      \"enabled\": true,\n      \"discordClient\": \"discord\",\n      \"action\": \"none\",\n      \"channelIDs\": [],\n      \"embedFormat\": {\n        \"player\": \"[[{{name}}](https://www.battlemetrics.com/rcon/players?filter[search]={{eosID}}\u0026method=quick\u0026redirect=1 'Go to BattleMetrics')] - [[{{steamID}}](https://steamcommunity.com/profiles/{{steamID}} 'Go to Steam Profile')]\",\n        \"squad\": \"{{squadID}} : {{squadName}}\",\n        \"team\": \"{{teamID}} : {{teamName}}\"\n      },\n      \"playerNames\": {\n        \"action\": \"none\",\n        \"alphabet\": \"abcdefghijklmnopqrstuvwxyz1234567890\",\n        \"extends\": \"\",\n        \"minimum\": 0\n      },\n      \"profanity\": []\n    }\n  ]\n}\n```\n\n## Cerberus edition\n\n\u003e Anything with `?` at the end means it is **optional** and can be removed from the config.\n\nThe name **Cerberus** comes from Greek mythology. Cerberus is a multi-headed dog that guards the gates of the Underworld to prevent the dead from leaving.\n\n**Options:**\n\nExtended upon [Watchdog Options](#watchdog)\n\n**Default `config.json`:**\n\n```json\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"Cerberus\",\n      \"enabled\": true,\n      \"discordClient\": \"discord\",\n      \"action\": \"none\",\n      \"channelIDs\": [],\n      \"playerNames\": {\n        \"action\": \"none\",\n        \"alphabet\": \"abcdefghijklmnopqrstuvwxyz1234567890\",\n        \"extends\": \"\",\n        \"minimum\": 0\n      },\n      \"profanity\": []\n    }\n  ]\n}\n```\n\n## Molly edition\n\n\u003e Anything with `?` at the end means it is **optional** and can be removed from the config.\n\nThe name **Molly** refers to our family dog, she is a english bulldog who has lived for 14 years! Due to her age she has sadly developed a fatal heart condition.\n\n**Pre-requirements:**\n\n- Requires [BattleMetricsAPI](https://github.com/magicoflolis/SquadJS-BattleMetricsAPI) connector.\n\n**Options:**\n\nExtended upon [Watchdog Options](#watchdog)\n\n- `bmClient` - BattleMetrics connector name.\n- `Ban?` - BattleMetrics ban info.\n\n**Default `config.json`:**\n\n```json\n{\n  \"plugins\": [\n    {\n      \"plugin\": \"Molly\",\n      \"enabled\": true,\n      \"bmClient\": \"BattleMetrics\",\n      \"action\": \"none\",\n      \"Ban\": {\n        \"note\": \"Banned by Watchdog Molly\",\n        \"reason\": \"{{reason}} | {{timeLeft}}\"\n      },\n      \"channelIDs\": [],\n      \"playerNames\": {\n        \"action\": \"none\",\n        \"alphabet\": \"abcdefghijklmnopqrstuvwxyz1234567890\",\n        \"extends\": \"\",\n        \"minimum\": 0\n      },\n      \"profanity\": []\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjs-watchdog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicoflolis%2Fsquadjs-watchdog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjs-watchdog/lists"}