Jump to content

API: Startup

From fCraft Wiki
Revision as of 02:04, 12 January 2012 by F (talk | contribs)

To start the server, fCraft front-ends should call Server.InitLibrary(), Server.InitServer(), and Server.StartServer() in the right order. The following sequence of events takes place (raised events are in italics).

  1. Server.InitLibrary
    1. Reads command-line switches and sets up path and logging
    2. Logger.Logged
  2. Server.InitServer
    1. Activates plugins
      • PluginManager.PluginAdded
      • PluginManager.PluginActivated
    2. Server.Initializing
    3. Loads config
      • Config.KeyChanging
      • Config.KeyChanged
    4. Loads PlayerDB
    5. Loads IPBanList
    6. Prepares commands
      • CommandManager.CommandRegistering
      • CommandManager.CommandRegistered
    7. Loads AutoRank settings
    8. Server.Initialized
  3. Server.StartServer
    1. Sets Server.StartTime
    2. Server.Starting
    3. Creates Player.Console and Player.AutoRank
    4. Loads world list
      • WorldManager.WorldCreating
      • WorldManager.WorldCreated
    5. Sets up networking (sets Port, InternalIP, and ExternalIP)
    6. Starts listening for connections
    7. Starts IRC
    8. Starts Heartbeat
    9. Starts AutoRank
    10. Starts Scheduler
    11. Server.Started