mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
- 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
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
- CLI flags (highest priority)
- Environment variables (
ERUPE_DB_*) config.jsonfile- 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 |