Conversation
Add comprehensive Thai documentation for the azael_connshield resource: index, commands, config (auth, command, core, permissions), server exports, and module docs (commands, hooks, logger, player). Also update sidebars.js to include the new docs. These files document configuration, commands, API exports and behavior for the resource.
…d docs Add MDX imports for Docusaurus Tabs and TabItem to enable tabbed content rendering in documentation. The import lines were added to the following files: - cfx/script/azael_connshield/commands.md - cfx/script/azael_connshield/exports/server.md - cfx/script/azael_connshield/modules/commands/server.md This ensures Tab components are available where tabbed sections are used in these docs.
…nshield docs Remove the 'คุณสมบัติหลัก' (Main features) section and its bullet points from cfx/script/azael_connshield/index.md. The deleted list described identifier uniqueness, IP connection limits, IP reputation checks, bypass rules, and related commands in the Thai documentation.
Fix the Cfx.re Documentation URL in cfx/script/azael_connshield/config/core.md to point to the Server Commands access-control section (server-commands/#access-control-commands) so the ACE Permission reference links to the correct, up-to-date documentation.
Translate and standardize documentation headers and table column labels from Thai to English across the azael_connshield docs. Changes: convert the core group heading to "Default Groups" and English table headers in cfx/script/azael_connshield/config/core.md, update the table header in cfx/script/azael_connshield/config/permissions.md to "Group | Description", and change the event table header to "Event Name | Description" in cfx/script/azael_connshield/modules/logger/server.md for consistent English documentation.
Replace plain references to azael_active-identifiers with relative Markdown links in cfx/script/azael_connshield/config/core.md and cfx/script/azael_connshield/index.md to improve navigation and cross-references. Documentation-only change; no code or functional updates.
Replace sample IP 1.2.3.4 with localhost (127.0.0.1) in cfx/script/azael_connshield/exports/server.md. Updates the Lua example call and the argument description to use 127.0.0.1 for a clearer, safer local example.
Add an info note to cfx/script/azael_connshield/commands.md clarifying the default value for `options`. If `options` is not specified, it defaults to `all`, which skips both Identifier Uniqueness and IP Protections checks. Improves documentation clarity for command usage.
There was a problem hiding this comment.
Pull request overview
Adds a new documentation section for the azael_connshield CFX resource and wires it into the Docusaurus sidebar, covering installation, configuration, commands, modules, and server exports.
Changes:
- Added a full set of new docs under
cfx/script/azael_connshield/*(core/auth/permissions/commands/exports/modules). - Documented server-side modules (Commands/Hooks/Logger/Player) and server export functions.
- Updated
sidebars.jsto expose the new documentation tree in navigation.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sidebars.js | Adds an azael_connshield sidebar category with links to the new docs. |
| cfx/script/azael_connshield/index.md | Resource overview, requirements, install/disable steps, and migration note. |
| cfx/script/azael_connshield/config/auth.md | Documents license token (productToken) configuration. |
| cfx/script/azael_connshield/config/core.md | Documents core configuration: locale/debug, uniqueness, IP protection, bypass rules, blocked resources. |
| cfx/script/azael_connshield/config/command.md | Documents command name + subcommand configuration and allowed groups. |
| cfx/script/azael_connshield/config/permissions.md | Documents ACE permission setup and group assignment examples. |
| cfx/script/azael_connshield/commands.md | Documents admin commands (addbypass, removebypass) with usage/args/returns. |
| cfx/script/azael_connshield/exports/server.md | Documents server exports (executeCommand, addBypass, removeBypass, checkIp). |
| cfx/script/azael_connshield/modules/commands/server.md | Documents the server-side command module and response handlers. |
| cfx/script/azael_connshield/modules/hooks/server.md | Documents server-side hook points and their return behavior. |
| cfx/script/azael_connshield/modules/logger/server.md | Documents logger callbacks and emitted event names for server logs integration. |
| cfx/script/azael_connshield/modules/player/server.md | Documents player identifier helper functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pcall(function() | ||
| exports['azael_dc-serverlogs']:insertData({ | ||
| event = 'CNS_DuplicateIdKick', | ||
| content = '...', | ||
| ... | ||
| }) |
There was a problem hiding this comment.
The Lua examples use ... placeholders inside the insertData({ ... }) table (e.g., content = '...', ...). ... is not valid Lua syntax and may confuse users copying the snippet. Consider replacing these placeholders with either a minimal valid payload (e.g., omit extra fields) or use Lua comments like -- ... to indicate omitted lines while keeping the example syntactically valid.
| TriggerClientEvent('chat:addMessage', client, { | ||
| args = { message } |
There was a problem hiding this comment.
In this documented implementation of Commands.sendClientMessage, the success parameter is never used, but it’s listed as a parameter and passed by callers in the earlier example. Either update the snippet to demonstrate how success affects the message formatting/behavior, or remove success from the function signature/parameter docs to keep the documentation internally consistent.
| TriggerClientEvent('chat:addMessage', client, { | |
| args = { message } | |
| local prefix = success and '^2[SUCCESS]^7 ' or '^1[FAILED]^7 ' | |
| TriggerClientEvent('chat:addMessage', client, { | |
| args = { prefix .. message } |
| ```bash | ||
| <commandName> removebypass <identifier> | ||
| ``` | ||
| </TabItem> | ||
| <TabItem value="example" label="Example"> | ||
| ```bash | ||
| cshield removebypass steam:1100001332e7216 | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| #### Arguments | ||
|
|
||
| - commandName: `string` | ||
| - ชื่อของ [คำสั่งหลัก](./config/command.md#commandname) เพื่ออ้างอิงว่าเป็นคำสั่งของทรัพยากรนี้ สำหรับใช้งานผ่าน Server Console หรือ Client Console | ||
| - subCommandName: `string` | ||
| - ชื่อของ [คำสั่งย่อย](./config/command.md#subcommands) และค่าเริ่มต้นคือ [`removebypass`](./config/command.md#removebypass) | ||
| - identifier: `string` | ||
| - ตัวระบุของผู้เล่น โดยต้องมีคำนำหน้าตรงกับประเภท [identifierUniqueness.provider](./config/core.md#identifieruniqueness) เช่น `steam:1100001332e7216` |
There was a problem hiding this comment.
removebypass is documented without an <options> argument, but other docs suggest bypass-type selection exists (e.g., the export removeBypass(identifier, bypassOptions) and the response listing bypassTypes). Please clarify whether removebypass also accepts an optional <options> (all/id/ip) and document it if so; otherwise explicitly state that the command always removes all bypass types.
… events Enhance logging in cfx/script/azael_connshield/modules/logger/server.md by replacing generic placeholders with detailed, structured payloads for multiple events. Handlers updated: onPlayerDuplicateIdentifier, onPlayerIpLimitExceeded, onPlayerIpReputationBlocked, onPlayerBypassedRules, and onCommandExecuted — adding localized content titles, fields arrays (with identifiers, IPs, players, risk/confidence, bypass rule entries, command results, errors, etc.), source, color, and options (disable codeblock). Also added logic to compute kick/result colors, invoker info, and formatting of identifier lists and JSON-encoded player lists to improve clarity in exports['azael_dc-serverlogs']:insertData calls.
…ages Update example in cfx/script/azael_connshield/modules/commands/server.md: TriggerClientEvent now enables multiline, sets color depending on success (green for success, red for failure), and prepends a '»' prefix to the message args to improve chat formatting and visibility.
…mmand docs Update removebypass command documentation to include an optional <options> argument and adjust the example. Document the new `options: string | nil` parameter with allowed values `all`, `id`, and `ip`, describing what each removes (all bypasses, Identifier Uniqueness only, IP Protections only) and note that the default is `all` when omitted. Affected file: cfx/script/azael_connshield/commands.md.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@Azael-Dev I've opened a new pull request, #2, to work on those changes. Once the pull request is ready, I'll request review from you. |
This pull request introduces comprehensive documentation for the
azael_connshieldresource, detailing its configuration, commands, permissions, and server exports. The changes provide clear guidance for installation, usage, and integration, as well as explanations for all configurable options and command usage. The documentation is organized into themed files for easy navigation and understanding.Core configuration and features:
cfx/script/azael_connshield/config/core.md: Added detailed explanations for core settings, including locale, debug mode, identifier uniqueness, IP protection, bypass rules, and resource blocking. Each section includes code examples and tips for customization.cfx/script/azael_connshield/config/auth.md: Documented the authentication configuration, specifically how to set theproductTokenfor license verification.Command and permission documentation:
cfx/script/azael_connshield/commands.md: Provided thorough documentation of admin commands, including adding and removing bypass rights, argument details, and expected return values.cfx/script/azael_connshield/config/command.md: Explained command configuration, including main command name and subcommands with usage examples and permission groups.cfx/script/azael_connshield/config/permissions.md: Clarified ACE permission setup, installation instructions, group assignments, and their effects on bypass rules and commands.Server-side exports and integration:
cfx/script/azael_connshield/exports/server.md: Added documentation for server-side export functions, includingexecuteCommand,addBypass,removeBypass, andcheckIp, with usage examples and detailed return structures.Resource overview and installation:
cfx/script/azael_connshield/index.md: Introduced the resource, its purpose, requirements, installation steps, and migration notes from the previous version.