Jump to content

API: Startup: Difference between revisions

From fCraft Wiki
No edit summary
No edit summary
Line 5: Line 5:
##''Logger.Logged''
##''Logger.Logged''
#Server.InitServer
#Server.InitServer
##Activates plugins
##Activates plugins (0.700+)
##*''PluginManager.PluginAdded''
##*''PluginManager.PluginAdded''
##*''PluginManager.PluginActivated''
##*''PluginManager.PluginActivated''

Revision as of 20:58, 6 February 2012

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 (0.700+)
      • 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