Jump to content

API: Startup: Difference between revisions

From fCraft Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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'').
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''). fCraft tools usually only call InitLibrary and selected methods from InitServer(). For instance, ConfigGUI calls InitLibrary and Config.Load().


#Server.InitLibrary
#Server.InitLibrary
##Reads command-line switches and sets up path and logging
##Reads command-line switches, and sets up path and logging
##''Logger.Logged''
##''Logger.Logged''
#Server.InitServer
#Server.InitServer

Latest revision as of 21:03, 20 August 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). fCraft tools usually only call InitLibrary and selected methods from InitServer(). For instance, ConfigGUI calls InitLibrary and Config.Load().

  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