Panel/docs/modules/GAMEMANAGER.md

2.1 KiB

GameManager

Role

Panel/modules/gamemanager is the core customer server control module. It owns:

  • start
  • stop
  • restart
  • logs
  • server monitor
  • update flow hooks
  • RCON integration
  • status display

Important Files

  • Panel/modules/gamemanager/module.php
  • Panel/modules/gamemanager/home_handling_functions.php
  • Panel/modules/gamemanager/server_monitor.php
  • Panel/modules/gamemanager/start_server.php
  • Panel/modules/gamemanager/stop_server.php
  • Panel/modules/gamemanager/restart_server.php
  • Panel/modules/gamemanager/log.php
  • Panel/modules/gamemanager/view_server_log.php
  • Panel/modules/gamemanager/get_server_log.php
  • Panel/modules/gamemanager/update_server.php

Start / Stop / Restart

The module calls the agent through Panel/includes/lib_remote.php.

Current shape:

  • start -> universal_start
  • stop -> remote_stop_server
  • restart -> remote_restart_server

The right behavior is:

  • start shows STARTING as soon as the managed session exists
  • online status requires the process/session plus the game port
  • restart should be stop, wait, start
  • stop should not be treated as complete until the session/process is actually gone

Status Reporting

The current flow now points toward agent-truth status reporting via:

  • remote_server_status
  • get_agent_server_status in home_handling_functions.php
  • server_status_without_decrypt in both agents

Useful state labels:

  • OFFLINE
  • STARTING
  • ONLINE
  • STOPPING
  • UNRESPONSIVE
  • UNKNOWN

Query checks should remain optional metadata only.

Log Viewer

Relevant files:

  • Panel/modules/gamemanager/log.php
  • Panel/modules/gamemanager/view_server_log.php
  • Panel/modules/gamemanager/get_server_log.php

The log view should be treated as live, AJAX-updated output rather than a full page reload workflow.

What This Module Depends On

  • config_games for startup parameters and protocol definitions
  • lib_remote.php for agent calls
  • user_games for server home records
  • rcon for command support where available
  • addonsmanager for content/mod interactions