public void Initialize(IHttpServer server)
        {
            m_log.DebugFormat("[PotamOS]: Initializing. Server at port {0}. Service is {1}", server.Port, Enabled ? "enabled" : "disabled");

            if (!Enabled)
            {
                return;
            }

            //IConfig serverConfig = Config.Configs[ConfigName];
            //if (serverConfig == null)
            //    throw new Exception(String.Format("No section {0} in config file", ConfigName));

            m_PotamOSMain = new PotamOSMain(Config, server, ConfigName);
        }
Example #2
0
 private void EventManager_OnRegionReadyStatusChange(IScene obj)
 {
     try
     {
         if (m_Enabled)
         {
             m_PotamOSMain = new PotamOSMain(m_Config, MainServer.Instance, string.Empty, m_Scenes);
             m_log.Debug("[PotamOS]: PotamOS enabled.");
         }
         else
         {
             m_log.Debug("[PotamOS]: PotamOS disabled.");
         }
     }
     catch (Exception e)
     {
         m_log.ErrorFormat(e.StackTrace);
         m_log.ErrorFormat("[PotamOS]: Could not load PotamOS: {0}. ", e.Message);
         return;
     }
 }