Files
Erupe/tools/usercheck
Houmgaor e7eab936a9 test: increase total coverage from 46.1% to 50.5%
- Fix duplicate test declarations across coverage2, misc, mercenary, event files
- Fix signserver TestHandlePacketDELETE timeout (multi-write pipe deadlock)
- Fix entranceserver build error (invalid -1 for uint16 port)
- Add handlers_reserve_test.go covering all 56 reserve handler stubs
- Add handlers_coverage3_test.go with 115+ handler tests
- Add handlers_register_test.go with 55 Raviente register/load tests
- Add handlers_coverage_test.go, signserver, entranceserver, usercheck tests
2026-02-08 18:42:55 +01:00
..

usercheck

CLI tool to query connected users and server status from the Erupe database.

Build

go build -o usercheck

Usage

./usercheck <command> [options]

By default, the tool reads database credentials from config.json in the project root.

Commands

Command Description
list List all currently connected users
count Show count of connected users per server
search Search for a connected user by name
servers Show server/channel status
history Show login history for a player

Examples

# List connected users (uses config.json)
./usercheck list

# Verbose output with last login times
./usercheck list -v

# Search for a player
./usercheck search -name "Hunter"

# Show server status
./usercheck servers

# Player login history
./usercheck history -name "Hunter"

# Use a specific config file
./usercheck list -config /path/to/config.json

# Override database password
./usercheck list -password "different_password"

Configuration Priority

  1. CLI flags (highest priority)
  2. Environment variables (ERUPE_DB_*)
  3. config.json file
  4. Default values (lowest priority)

Database Flags

Flag Env Variable Description
-config - Path to config.json
-host ERUPE_DB_HOST Database host
-port - Database port
-user ERUPE_DB_USER Database user
-password ERUPE_DB_PASSWORD Database password
-dbname ERUPE_DB_NAME Database name