How klayeryt/welcome works
Welcome is a CounterStrikeSharp plugin that announces player connections and disconnections in chat. Its main workflow handles game events, applies configuration gates, enriches player details, formats template tags and colors, and sends messages to one player or all players. Disconnect reasons are represented by a local enum. The README documents configurable templates and placeholders; source excerpts show the event handling and formatting implementation. The repository is small, so nodes focus on runtime responsibilities rather than build or delivery tooling.
Main entry points: Main.cs Connect handler · ENetworkDisconnectionReason.cs Disconnect reasons · GeoLite2-Country.mmdb GeoLite country data
Components 12
Plugin runtime
- Welcome plugin
Main.cs - Plugin config
Main.cs - Connect handler
Main.cs - Disconnect handler
Main.cs - Disconnect reasons
ENetworkDisconnectionReason.cs
Chat messages
- Message templates
Main.cs - Tag and color formatter
Main.cs
Player lookup
- Country lookup
Main.cs - GeoLite country data
GeoLite2-Country.mmdb
Other components
- CS2 server
- Server chat
- Connecting player
Connections 16
- CS2 server → Connect handler: fires connect
Main.cs - CS2 server → Disconnect handler: fires disconnect
Main.cs - Welcome plugin → Plugin config: loads config
Main.cs - Connect handler → Plugin config: checks flags
Main.cs - Disconnect handler → Plugin config: checks flag
Main.cs - Connect handler → Country lookup: looks up country
Main.cs - Disconnect handler → Country lookup: looks up country
Main.cs - Country lookup → GeoLite country data: reads country data
Main.cs - Connect handler → Message templates: selects greetings
Main.cs - Disconnect handler → Message templates: selects departure text
Main.cs - Connect handler → Tag and color formatter: formats messages
Main.cs - Disconnect handler → Tag and color formatter: formats messages
Main.cs - Disconnect handler → Disconnect reasons: maps reason code
Main.cs - Connect handler → Connecting player: sends delayed greeting
Main.cs - Connect handler → Server chat: broadcasts arrival
Main.cs - Disconnect handler → Server chat: broadcasts departure
Main.cs