Skip to main content

Garry's Mod Plugin

ticket_tool_link connects your Garry's Mod server to one Discord server. When someone opens a ticket, staff see the player's in-game name, whether they are online and when they were last seen, their rank (the ULX or SAM usergroup) and playtime, and any active ban from ULX, SAM or the server's own ban list.

Community and Pro

Lookups, ban lookup and in-game reports are included with Community and Pro. Staff actions need Pro. Game Server Plugins compares the five official plugins.

Requirements

  • Server: a Garry's Mod dedicated server. The addon is plain GLua and uses the game's built-in HTTP().
  • Admin mod (optional): ULX or SAM, for the rank and their bans. Without one, the addon reads the default ban list (banned_user.cfg).
  • Network: outbound HTTPS to dash.ticket-tool.app. There is no port to open.

How members are matched

Ticket Tool looks up the Steam account the ticket opener linked on their Linked accounts page and shared with your Discord server, and asks the plugin about that SteamID64. There is no in-game linking: members link Steam once, by signing in through Steam or importing it from Discord. If the opener hasn't shared a Steam account with your server, the card says so and the plugin isn't asked.

Download

Download ticket_tool_link-gmod-<version>.zip from the Garry's Mod releases page of the open-source ticket-tool-app/integrations repository.

Setup

Create a plugin key

Go to Dashboard → Automations → Connections. Under Game server plugins, click Create a key, pick Garry's Mod and name it after the server. Copy the key: it is only shown once. Create one key for each server you run.

Install the addon

Unzip the release into garrysmod/addons/. That gives you garrysmod/addons/ticket_tool_link/. Start the server once. That creates garrysmod/data/ticket_tool_link/config.json.

Paste the key

Paste the whole key from the dashboard into the key field:

{
  "key": "ttp_0123456789abcdef.your-key-here",
  "api-url": "https://dash.ticket-tool.app"
}

Instead of the file, you can set the key as a convar in server.cfg:

ticket_tool_key "ttp_0123456789abcdef.your-key-here"

Run ticket_tool_link reload in the server console. Within a few seconds the key shows Connected now on the Connections page, and ticket_tool_link status says the addon is connected. The key is never written to the server log.

The addon sets sv_hibernate_think 1 by default, so it keeps answering lookups while the server is empty.

Turn it on in a category

Edit a category and open Game server tools on the General tab. Switch on Garry's Mod in the Lookups card, tick Garry's Mod in the Ban lookup card, or both.

Commands

CommandWhat it does
ticket_tool_link statusShows the connection state, key id, Discord server and ban source
ticket_tool_link reloadRe-reads the config and reconnects

Run them in the server console.

What staff see

  • Lookups card: the player's in-game name with a link to their Steam profile, their SteamID64, Online on the server or Offline with the last-seen date, when they first joined, and up to six extra lines from the plugin, such as their rank and playtime.
  • Ban lookup card: a Garry's Mod row with the reason, date, expiry and moderator.
  • Variables: {gmod.linked}, {gmod.name}, {gmod.steam_id}, {gmod.url}, {gmod.online}, {gmod.last_seen}, {gmod.first_seen}, {gmod.server} and {gmod.details}, plus {bans.gmod.banned}, {bans.gmod.reason} and the other bans.gmod fields. Variables says what each one holds.

If the plugin is offline or slow, the ticket still opens straight away. Staff see the linked Steam account and a note that the plugin didn't answer.

Ban sources

providerBan source
ulxULX bans
samSAM bans
serverThe default ban list (banned_user.cfg)

Steam's own VAC and game bans are a separate Ban Lookup source.

Staff actions and in-game reports

Staff can message, warn, kick or unban a player from Discord, and players can report from in game. Both are off until you turn them on in the plugin's config, and Ticket Tool only offers the actions you turned on. Staff actions need Pro; in-game reports work on Community and Pro. Staff actions and In-game reports explain where staff run them and how a report opens a ticket.

{
  "actions": ["message", "warn", "kick", "unban"],
  "reports": true,
  "report-command": "report",
  "report-cooldown": 60
}

The convars ticket_tool_actions (comma separated), ticket_tool_reports, ticket_tool_report_command and ticket_tool_report_cooldown work too. Run ticket_tool_link reload after changing them.

ActionWhat happens in game
messageThe player gets a chat message from the staff member
warnThe player gets a warning in chat and in the middle of the screen
kickThe player is kicked with the reason staff typed
unbanThe ban is lifted where it was found: ULib.unban for ULX, sam.player.unban for SAM, or removeid and writeid for the server list

With reports on, !report [player] <message> sends a report to Ticket Tool. The first word counts as the reported player only when it's the exact name of someone online. The command is kept out of public chat, the reporter is always the player who typed it, and each player can send one report every report-cooldown seconds.

Rotating or revoking a key

On the Connections page, Rotate issues a new key for the same entry and stops the old one at once, so put the new key in the plugin's config and reload. Revoke deletes the key, and Garry's Mod lookups show as unavailable. To build a plugin of your own, see the Game Plugin Protocol.