public void Start(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("PresenceHandler", "") != Name) return; CommonInit(config); registry.RegisterModuleInterface<IPresenceService>(this); registry.RegisterModuleInterface<IGridUserService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface<IAssetServiceConnector>(this); Configure(config, registry); IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AssetHandler", "") != Name) return; registry.RegisterModuleInterface<IAssetService>(this); }
public void Initialize (IConfigSource config, IRegistryCore registry) { m_registry = registry; registry.RegisterModuleInterface<IInstantMessagingService> (this); Init (registry, "InstantMessagingService", "", "/im/", "InstantMessageServerURI"); }
public void Initialize(IConfigSource config, IRegistryCore registry) { ReadConfig(config); IConfig handlers = config.Configs["Handlers"]; if (handlers.GetString("NeighborHandler", "") == Name) registry.RegisterModuleInterface<INeighborService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface<IAuthorizationService>(this); m_registry = registry; MainConsole.Instance.Debug("[Authorization Service]: Local Authorization service enabled"); }
public void Init(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface<INotificationService>(this); MainConsole.NotificationService = this; MainConsole.Instance.Commands.AddCommand("show notifications", "show notifications", "Shows all new notifications", DisplayNotifications); }
public virtual void Initialize(IConfigSource config, IRegistryCore registry) { _config = config; m_registry = registry; IConfig agentConfig = config.Configs["AgentProcessing"]; if (agentConfig != null) { m_enabled = agentConfig.GetString("Module", "AgentProcessing") == "AgentProcessing"; VariableRegionSight = agentConfig.GetBoolean("UseVariableRegionSightDistance", VariableRegionSight); MaxVariableRegionSight = agentConfig.GetInt("MaxDistanceVariableRegionSightDistance", MaxVariableRegionSight); } if (m_enabled) { m_registry.RegisterModuleInterface<IAgentProcessing>(this); IConfig auroraConfig = _config.Configs["AuroraConnectors"]; IGenericsConnector genericsConnector = Aurora.DataManager.DataManager.RequestPlugin<IGenericsConnector>(); if (!auroraConfig.GetBoolean("CapsServiceDoRemoteCalls", false)) { genericsConnector.AddGeneric(UUID.Zero, "CapsServiceURL", "CapsURL", new OSDWrapper { Info = MainServer.Instance.ServerURI }.ToOSD()); genericsConnector.AddGeneric(UUID.Zero, "CapsServiceURL", "CapsPassword", new OSDWrapper { Info = new System.Random().NextDouble() * 1000 }.ToOSD()); } Init(registry, "CapsService"); } }
public override void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; registry.RegisterModuleInterface<IAssetServiceConnector>(this); IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AssetHandler", "") != Name) return; if (MainConsole.Instance != null) MainConsole.Instance.Commands.AddCommand("dump asset", "dump asset <id> <file>", "dump one cached asset", HandleDumpAsset); registry.RegisterModuleInterface<IAssetService>(this); }
public virtual void AddNewRegistry(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("EventQueueHandler", "") != Name) return; registry.RegisterModuleInterface<IEventQueueService>(this); }
public virtual void Configure(IConfigSource config, IRegistryCore registry) { m_registry = registry; m_database = Framework.Utilities.DataManager.RequestPlugin<IAssetDataPlugin>(); registry.RegisterModuleInterface<IAssetService>(this); IConfig handlers = config.Configs["Handlers"]; if (handlers != null) doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false); if (MainConsole.Instance != null && !DoRemoteCalls) { MainConsole.Instance.Commands.AddCommand( "show digest", "show digest <ID>", "Show asset digest", HandleShowDigest, false, true); MainConsole.Instance.Commands.AddCommand( "delete asset", "delete asset <ID>", "Delete asset from database", HandleDeleteAsset, false, true); MainConsole.Instance.Commands.AddCommand("get asset", "get asset <ID>", "Gets info about asset from database", HandleGetAsset, false, true); } MainConsole.Instance.Debug("[ASSET SERVICE]: Local asset service enabled"); }
public virtual void Configure(IConfigSource config, IRegistryCore registry) { if (!m_enabled) return; m_registry = registry; registry.RegisterModuleInterface<IAssetService>(this); IConfig handlers = config.Configs["Handlers"]; if (handlers != null) doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false); if (MainConsole.Instance != null && !DoRemoteCalls) { MainConsole.Instance.Commands.AddCommand( "show digest", "show digest <ID>", "Show asset digest", HandleShowDigest, false, true); MainConsole.Instance.Commands.AddCommand( "delete asset", "delete asset <ID>", "Delete asset from database", HandleDeleteAsset, false, true); MainConsole.Instance.Commands.AddCommand( "get asset", "get asset <ID>", "Gets info about asset from database", HandleGetAsset, false, true); MainConsole.Instance.Info("[FILE ASSET SERVICE]: File based asset service enabled"); } }
public virtual void Configure(IConfigSource config, IRegistryCore registry) { m_registry = registry; m_database = DataManager.RequestPlugin<IAssetDataPlugin>(); if (m_database == null) throw new Exception("Could not find a storage interface in the given module"); registry.RegisterModuleInterface<IAssetService>(this); IConfig handlers = config.Configs["Handlers"]; if (handlers != null) doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false); if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand("show digest", "show digest <ID>", "Show asset digest", HandleShowDigest); MainConsole.Instance.Commands.AddCommand("delete asset", "delete asset <ID>", "Delete asset from database", HandleDeleteAsset); } MainConsole.Instance.Debug("[ASSET SERVICE]: Local asset service enabled"); }
public void LoadLibrary(ILibraryService service, IConfigSource source, IRegistryCore registry) { m_service = service; IConfig assetConfig = source.Configs["DefaultXMLAssetLoader"]; if (assetConfig == null){ return; } string loaderArgs = assetConfig.GetString("AssetLoaderArgs", String.Empty); bool assetLoaderEnabled = !assetConfig.GetBoolean("PreviouslyLoaded", false); if (!assetLoaderEnabled) return; registry.RegisterModuleInterface<DefaultAssetXMLLoader>(this); MainConsole.Instance.InfoFormat("[DefaultXMLAssetLoader]: Loading default asset set from {0}", loaderArgs); IAssetService assetService = registry.RequestModuleInterface<IAssetService>(); ForEachDefaultXmlAsset(loaderArgs, delegate(AssetBase a) { if (!assetLoaderEnabled && assetService.GetExists(a.IDString)) return; assetService.Store(a); }); }
public void PostInitialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("FreeSwitchHandler", "") != Name) return; registry.RegisterModuleInterface<IFreeswitchService>(this); }
public virtual void Initialize (IConfigSource config, IRegistryCore registry) { IConfig handlers = config.Configs ["Handlers"]; if (handlers.GetString ("SimulationHandler", "") == "SimulationServiceConnector") registry.RegisterModuleInterface<ISimulationService> (this); m_registry = registry; }
public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface<IAsyncMessageRecievedService>(this); IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("MessagingServiceInHandler", "") != Name) return; m_enabled = true; }
public void AddNewRegistry(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("FriendsHandler", "") != Name) return; registry.RegisterModuleInterface<IFriendsService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; m_registry.RegisterModuleInterface<IAgentProcessing>(this); IConfig agentConfig = config.Configs["AgentProcessing"]; if (agentConfig != null) m_useCallbacks = agentConfig.GetBoolean ("UseCallbacks", m_useCallbacks); }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("CapsHandler", "") != Name) return; m_registry = registry; registry.RegisterModuleInterface<ICapsService>(this); }
public void Initialize (IConfigSource config, IRegistryCore registry) { IConfig imageConfig = config.Configs ["ImageDecoding"]; if (imageConfig != null) { m_useCSJ2K = imageConfig.GetBoolean ("UseCSJ2K", m_useCSJ2K); m_useCache = imageConfig.GetBoolean ("UseJ2KCache", m_useCache); } registry.RegisterModuleInterface<IJ2KDecoder> (this); }
public void Start(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AuthenticationHandler", "") != Name) return; CommonInit(config); registry.RegisterModuleInterface<IAuthenticationService>(this); }
public override void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlers = config.Configs["Handlers"]; if (handlers.GetString("SimulationHandler", "") == "GatekeeperServiceConnector") { registry.RegisterModuleInterface<ISimulationService>(this); m_localBackend = new LocalSimulationServiceConnector(); } }
public virtual void Initialize (IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AgentInfoHandler", "") != Name) return; registry.RegisterModuleInterface<IAgentInfoService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("SyncMessagePosterServiceHandler", "") != Name) return; registry.RegisterModuleInterface<ISyncMessagePosterService>(this); }
public override void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("EventQueueHandler", "") != Name) return; registry.RegisterModuleInterface<IEventQueueService>(this); }
public void PostInitialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AssetHandler", "") != Name) return; CommonInit(config); registry.RegisterModuleInterface<IAssetService>(this); }
public virtual void Initialize (IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs ["Handlers"]; if (handlerConfig.GetString ("FriendsHandler", "") != Name) return; registry.RegisterModuleInterface<IFriendsService> (this); m_registry = registry; Init (registry, Name); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_config = config.Configs["MurmurService"]; if (m_config != null) { bool enabled = m_config.GetString("MurmurService") == GetType().Name; if(enabled) registry.RegisterModuleInterface<IMurmurService>(this); } }
public void Start(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("InventoryInHandler", "") != Name) return; m_registry = registry; m_registry.RegisterModuleInterface<InventoryInConnector> (this); m_registry.RequestModuleInterface<IGridRegistrationService>().RegisterModule(this); }
public void Start(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AsyncMessagePostServiceHandler", "") != Name) return; m_registry = registry; registry.RegisterModuleInterface<IAsyncMessagePostService>(this); m_asyncReceiverService = registry.RequestModuleInterface<IAsyncMessageRecievedService>(); }
public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface <IGridRegistrationService>(this); m_registry = registry; m_simulationBase = registry.RequestModuleInterface <ISimulationBase>(); IConfig ConfigurationConfig = config.Configs["Configuration"]; if (ConfigurationConfig != null) { m_loadBalancer.SetUrls(ConfigurationConfig.GetString("HostNames", "http://localhost").Split(',')); } m_permissionConfig = config.Configs["RegionPermissions"]; if (m_permissionConfig != null) { ReadConfiguration(m_permissionConfig); } }
public void Start(IConfigSource config, IRegistryCore registry) { IConfig externalConfig = config.Configs["ExternalCaps"]; if (externalConfig == null) { return; } m_allowedCapsModules = Util.ConvertToList(externalConfig.GetString("CapsHandlers"), true); ISyncMessageRecievedService service = registry.RequestModuleInterface <ISyncMessageRecievedService>(); service.OnMessageReceived += service_OnMessageReceived; m_syncPoster = registry.RequestModuleInterface <ISyncMessagePosterService>(); m_registry = registry; registry.RegisterModuleInterface <IExternalCapsHandler>(this); Init(registry, GetType().Name); }
public void Initialize(IConfigSource source, IRegistryCore registry) { m_source = source; m_config = source.Configs["AuroraInterWorldConnectors"]; if (m_config != null) { m_Enabled = m_config.GetBoolean("Enabled", false); m_allowUntrustedConnections = m_config.GetBoolean("AllowUntrustedConnections", m_allowUntrustedConnections); m_untrustedConnectionsDefaultTrust = (ThreatLevel) Enum.Parse(typeof(ThreatLevel), m_config.GetString("UntrustedConnectionsDefaultTrust", m_untrustedConnectionsDefaultTrust.ToString())); registry.RegisterModuleInterface(this); registry.StackModuleInterface <ICommunicationService>(this); m_registry = registry; } }
public void FinishedStartup() { if (m_registry == null) { return; } m_registry.RegisterModuleInterface <IMoneyModule>(this); ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager>(); if (manager != null) { manager.OnAddedScene += (scene) => { m_scenes.Add(scene); scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnClosingClient += OnClosingClient; scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; scene.EventManager.OnValidateBuyLand += EventManager_OnValidateBuyLand; scene.RegisterModuleInterface <IMoneyModule>(this); }; manager.OnCloseScene += (scene) => { scene.EventManager.OnNewClient -= OnNewClient; scene.EventManager.OnClosingClient -= OnClosingClient; scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent; scene.EventManager.OnValidateBuyLand -= EventManager_OnValidateBuyLand; scene.RegisterModuleInterface <IMoneyModule>(this); m_scenes.Remove(scene); }; } if (!m_connector.DoRemoteCalls) { if ((m_connector.GetConfig().GiveStipends) && (m_connector.GetConfig().Stipend > 0)) { new GiveStipends(m_connector.GetConfig(), m_registry, m_connector); } } }
public void Configure(IConfigSource config, IRegistryCore registry) { if (MainConsole.Instance != null) { if (!m_doRemoteCalls) { MainConsole.Instance.Commands.AddCommand( "create user", "create user [<first> [<last> [<pass> [<email>]]]]", "Create a new user", HandleCreateUser, false, true); MainConsole.Instance.Commands.AddCommand( "delete user", "delete user", "Deletes an existing user", HandleDeleteUser, false, true); MainConsole.Instance.Commands.AddCommand("reset user password", "reset user password [<first> [<last> [<password>]]]", "Reset a user password", HandleResetUserPassword, false, true); MainConsole.Instance.Commands.AddCommand( "show account", "show account <first> <last>", "Show account details for the given user", HandleShowAccount, false, true); MainConsole.Instance.Commands.AddCommand( "set user level", "set user level [<first> [<last> [<level>]]]", "Set user level. If the user's level is > 0, " + "this account will be treated as god-moded. " + "It will also affect the 'login level' command. ", HandleSetUserLevel, false, true); MainConsole.Instance.Commands.AddCommand( "set user profile title", "set user profile title [<first> [<last> [<Title>]]]", "Sets the title (Normally resident) in a user's title to some custom value.", HandleSetTitle, false, true); MainConsole.Instance.Commands.AddCommand( "set partner", "set partner", "Sets the partner in a user's profile.", HandleSetPartner, false, true); } } registry.RegisterModuleInterface <IUserAccountService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig avatarConfig = config.Configs["AvatarService"]; if (avatarConfig != null) { m_enableCacheBakedTextures = avatarConfig.GetBoolean("EnableBakedTextureCaching", m_enableCacheBakedTextures); } IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AvatarHandler", "") != Name) { return; } registry.RegisterModuleInterface <IAvatarService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AuthenticationHandler", "") != Name) { return; } // Try reading the [AuthenticationService] section first, if it exists IConfig authConfig = config.Configs["AuthenticationService"]; if (authConfig != null) { m_authenticateUsers = authConfig.GetBoolean("AuthenticateUsers", m_authenticateUsers); } m_Database = Framework.Utilities.DataManager.RequestPlugin <IAuthenticationData>(); registry.RegisterModuleInterface <IAuthenticationService>(this); }
public override void Initialize(Nini.Config.IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig hgConfig = config.Configs["HyperGrid"]; if (hgConfig == null || !hgConfig.GetBoolean("Enabled", false)) { return; } IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("AgentInfoHandler", "") != Name) { return; } registry.RegisterModuleInterface <IAgentInfoService>(this); Init(registry, Name); }
public void Start(IConfigSource config, IRegistryCore registry) { m_registry = registry; registry.RegisterModuleInterface <IGridWideMessageModule>(this); IConfig handlersConfig = config.Configs["Handlers"]; if (MainConsole.Instance != null && handlersConfig != null && handlersConfig.GetString("GridWideMessage", "") == "GridWideMessageModule") { MainConsole.Instance.Commands.AddCommand("grid send alert", "grid send alert <message>", "Sends a message to all users in the grid", SendGridAlert); MainConsole.Instance.Commands.AddCommand("grid send message", "grid send message <first> <last> <message>", "Sends a message to a user in the grid", SendGridMessage); MainConsole.Instance.Commands.AddCommand("grid kick user", "grid kick user <first> <last> <message>", "Kicks a user from the grid", KickUserMessage); } }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_cache = null; IConfig moduleConfig = config.Configs["Modules"]; if (moduleConfig == null) { return; } string name = moduleConfig.GetString("AssetCaching"); //MainConsole.Instance.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); if (name != Name) { return; } long maxSize = DefaultMaxSize; int maxCount = DefaultMaxCount; TimeSpan expirationTime = DefaultExpirationTime; IConfig assetConfig = config.Configs["AssetCache"]; if (assetConfig != null) { // Get optional configurations maxSize = assetConfig.GetLong("MaxSize", DefaultMaxSize); maxCount = assetConfig.GetInt("MaxCount", DefaultMaxCount); expirationTime = TimeSpan.FromMinutes(assetConfig.GetInt("ExpirationTime", (int)DefaultExpirationTime.TotalMinutes)); // Debugging purposes only m_debugEpoch = assetConfig.GetInt("DebugEpoch", 0); } Initialize(maxSize, maxCount, expirationTime); registry.RegisterModuleInterface <IImprovedAssetCache>(this); }
public void FinishedStartup() { if (m_registry == null) { return; } m_registry.RegisterModuleInterface <IMoneyModule>(this); ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager> (); if (manager != null) { manager.OnAddedScene += (scene) => { m_scenes.Add(scene); scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnClosingClient += OnClosingClient; scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; scene.EventManager.OnValidateBuyLand += EventManager_OnValidateBuyLand; scene.RegisterModuleInterface <IMoneyModule> (this); }; manager.OnCloseScene += (scene) => { scene.EventManager.OnNewClient -= OnNewClient; scene.EventManager.OnClosingClient -= OnClosingClient; scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent; scene.EventManager.OnValidateBuyLand -= EventManager_OnValidateBuyLand; scene.RegisterModuleInterface <IMoneyModule> (this); m_scenes.Remove(scene); }; } // these are only valid if we are local if (m_connector.IsLocalConnector) { m_userInfoService = m_registry.RequestModuleInterface <IAgentInfoService> (); m_userAccountService = m_registry.RequestModuleInterface <IUserAccountService> (); AddCommands(); } }
public void FinishedStartup() { // Lock out if remote if (isLocal) { m_registry.RegisterModuleInterface <IInventoryArchiverModule>(this); OnInventoryArchiveSaved += SaveIARConsoleCommandCompleted; if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand( "load iar", "load iar <first> <last> [<IAR path> [<inventory path>]]", "Load user inventory archive (IAR).\n " + "--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones\n" + "<first> is user's first name." + Environment.NewLine + "<last> is user's last name." + Environment.NewLine + "<IAR path> is the filesystem path or URI from which to load the IAR." + Environment.NewLine + " If this is not given then 'UserArchives' in the " + m_archiveDirectory + " directory is used\n" + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + " (Default is '/iar_import')", HandleLoadIARConsoleCommand, false, true); MainConsole.Instance.Commands.AddCommand( "save iar", "save iar <first> <last> [<IAR path> [<inventory path>]] [--noassets]", "Save user inventory archive (IAR). <first> is the user's first name." + Environment.NewLine + "<last> is the user's last name." + Environment.NewLine + "<IAR path> is the filesystem path at which to save the IAR." + Environment.NewLine + " If this is not given then the IAR will be saved in " + m_archiveDirectory + "/UserArchives\n" + "<inventory path> is the path inside the user's inventory for the folder/item to be saved.\n" + " (Default is all folders)\n" + " --noassets : if present, save withOUT assets.\n" + " This version will NOT load on another grid/standalone other than the current grid/standalone!" + "--perm=<permissions> : If present, verify asset permissions before saving.\n" + " <permissions> can include 'C' (Copy), 'M' (Modify, 'T' (Transfer)", HandleSaveIARConsoleCommand, false, true); } } }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig ssaConfig = config.Configs["SSAService"]; uint port = 8011; if (ssaConfig != null) { m_enabled = ssaConfig.GetBoolean("Enabled", m_enabled); port = ssaConfig.GetUInt("Port", port); } if (!m_enabled) { return; } IHttpServer server = registry.RequestModuleInterface <ISimulationBase>().GetHttpServer(port); ServiceURI = server.ServerURI + "/"; server.AddStreamHandler(new GenericStreamHandler("GET", "/texture/", GetBakedTexture)); registry.RegisterModuleInterface <IAgentAppearanceService>(this); m_registry = registry; }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig voiceconfig = config.Configs["Voice"]; if (voiceconfig == null) { return; } string voiceModule = "FreeSwitchVoice"; if (voiceconfig.GetString("Module", voiceModule) != voiceModule) { return; } IConfig freeswitchConfig = config.Configs["FreeswitchService"]; if (freeswitchConfig != null) { m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty); if (m_freeSwitchDefaultWellKnownIP == String.Empty) { MainConsole.Instance.Debug("[FREESWITCH]: No FreeswitchServerAddress given, can't continue"); return; } m_freeSwitchRealm = freeswitchConfig.GetString("Realm", m_freeSwitchDefaultWellKnownIP); m_freeSwitchSIPProxy = freeswitchConfig.GetString("SIPProxy", m_freeSwitchDefaultWellKnownIP + ":5060"); m_freeSwitchEchoServer = freeswitchConfig.GetString("EchoServer", m_freeSwitchDefaultWellKnownIP); m_freeSwitchEchoPort = freeswitchConfig.GetInt("EchoPort", m_freeSwitchEchoPort); m_freeSwitchAttemptUseSTUN = freeswitchConfig.GetBoolean("AttemptSTUN", false); // This may not work m_freeSwitchDefaultTimeout = freeswitchConfig.GetInt("DefaultTimeout", m_freeSwitchDefaultTimeout); m_freeSwitchContext = freeswitchConfig.GetString("Context", m_freeSwitchContext); m_freeSwitchServerUser = freeswitchConfig.GetString("UserName", m_freeSwitchServerUser); m_freeSwitchServerPass = freeswitchConfig.GetString("Password", m_freeSwitchServerPass); m_Enabled = true; registry.RegisterModuleInterface <IFreeswitchService>(this); } }
public virtual void Configure(IConfigSource config, IRegistryCore registry) { if (!m_enabled) { return; } m_registry = registry; registry.RegisterModuleInterface <IAssetService>(this); IConfig handlers = config.Configs["Handlers"]; if (handlers != null) { doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false); } if (MainConsole.Instance != null && !DoRemoteCalls) { MainConsole.Instance.Commands.AddCommand( "show digest", "show digest <ID>", "Show asset digest", HandleShowDigest, false, true); MainConsole.Instance.Commands.AddCommand( "delete asset", "delete asset <ID>", "Delete asset from database", HandleDeleteAsset, false, true); MainConsole.Instance.Commands.AddCommand( "get asset", "get asset <ID>", "Gets info about asset from database", HandleGetAsset, false, true); MainConsole.Instance.Info("[FILE ASSET SERVICE]: File based asset service enabled"); } }
public override void Initialize(IConfigSource config, IRegistryCore registry) { IConfig hgConfig = config.Configs["HyperGrid"]; if (hgConfig == null || !hgConfig.GetBoolean("Enabled", false)) { return; } IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("InventoryHandler", "") != Name) { return; } m_registry = registry; m_UserAccountService = registry.RequestModuleInterface <IUserAccountService> (); registry.RegisterModuleInterface <IInventoryService>(this); Init(registry, Name); }
public void Start(IConfigSource config, IRegistryCore registry) { GridInfoHandlers handlers = new GridInfoHandlers(config, registry); registry.RegisterModuleInterface <IGridInfo>(handlers); IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("GridInfoInHandler", "") != Name) { return; } handlerConfig = config.Configs["GridInfoService"]; IHttpServer server = registry.RequestModuleInterface <ISimulationBase>().GetHttpServer( (uint)handlerConfig.GetInt("GridInfoInHandlerPort", 0)); server.AddStreamHandler(new GenericStreamHandler("GET", "/get_grid_info", handlers.RestGetGridInfoMethod)); server.AddXmlRPCHandler("get_grid_info", handlers.XmlRpcGridInfoMethod); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_Config = config; //Load SMTP SERVER config try { IConfig SMTPConfig; if ((SMTPConfig = m_Config.Configs["SMTP"]) == null) { //MainConsole.Instance.InfoFormat("[SMTP] SMTP server not configured"); m_Enabled = false; return; } m_Enabled = SMTPConfig.GetBoolean("enabled", true); if (!m_Enabled) { m_Enabled = false; return; } m_localOnly = SMTPConfig.GetBoolean("local_only", true); m_HostName = SMTPConfig.GetString("host_domain_header_from", m_HostName); m_InterObjectHostname = SMTPConfig.GetString("internal_object_host", m_InterObjectHostname); SMTP_SERVER_HOSTNAME = SMTPConfig.GetString("SMTP_SERVER_HOSTNAME", SMTP_SERVER_HOSTNAME); SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); SMTP_SERVER_MONO_CERT = SMTPConfig.GetBoolean("SMTP_SERVER_MONO_CERT", SMTP_SERVER_MONO_CERT); m_MaxEmailSize = SMTPConfig.GetInt("email_max_size", m_MaxEmailSize); registry.RegisterModuleInterface <IEmailModule>(this); MainConsole.Instance.InfoFormat("[SMTP] Email enabled for {0}", m_localOnly ? "Local only" : "Full service"); } catch (Exception e) { MainConsole.Instance.Error("[EMAIL] DefaultEmailModule not configured: " + e.Message); m_Enabled = false; } }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; IConfig mapConfig = config.Configs["MapService"]; if (mapConfig != null) { m_enabled = mapConfig.GetBoolean("Enabled", m_enabled); m_port = mapConfig.GetUInt("Port", m_port); m_cacheEnabled = mapConfig.GetBoolean("CacheEnabled", m_cacheEnabled); m_cacheExpires = mapConfig.GetFloat("CacheExpires", m_cacheExpires); } if (!m_enabled) { return; } if (m_cacheEnabled) { m_assetCacheDir = config.Configs ["AssetCache"].GetString("CacheDirectory", m_assetCacheDir); CreateCacheDirectories(m_assetCacheDir); } m_server = registry.RequestModuleInterface <ISimulationBase>().GetHttpServer(m_port); m_server.AddStreamHandler(new GenericStreamHandler("GET", "/MapService/", MapRequest)); m_server.AddStreamHandler(new GenericStreamHandler("GET", "/MapAPI/", MapAPIRequest)); registry.RegisterModuleInterface <IMapService>(this); m_blankRegionTile = new Bitmap(256, 256); m_blankRegionTile.Tag = "StaticBlank"; using (Graphics g = Graphics.FromImage(m_blankRegionTile)) { SolidBrush sea = new SolidBrush(Color.FromArgb(29, 71, 95)); g.FillRectangle(sea, 0, 0, 256, 256); } m_blankRegionTileData = CacheMapTexture(1, 0, 0, m_blankRegionTile, true); }
public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface <IGridRegistrationService>(this); m_registry = registry; m_simulationBase = registry.RequestModuleInterface <ISimulationBase>(); m_configurationConfig = config.Configs["Configuration"]; m_loadBalancer.SetConfig(config, this); if (m_configurationConfig != null) { m_useSessionTime = m_configurationConfig.GetBoolean("UseSessionTime", m_useSessionTime); } if (m_configurationConfig != null) { m_useRegistrationService = m_configurationConfig.GetBoolean("UseRegistrationService", m_useRegistrationService); } m_permissionConfig = config.Configs["RegionPermissions"]; if (m_permissionConfig != null) { ReadConfiguration(m_permissionConfig); } }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig estConfig = config.Configs ["SystemUserService"]; if (estConfig != null) { governorName = estConfig.GetString("GovernorName", governorName); realEstateOwnerName = estConfig.GetString("RealEstateOwnerName", realEstateOwnerName); bankerName = estConfig.GetString("BankerName", bankerName); marketplaceOwnerName = estConfig.GetString("MarketplaceOwnerName", marketplaceOwnerName); } IConfig libConfig = config.Configs ["LibraryService"]; if (libConfig != null) { libraryOwnerName = libConfig.GetString("LibraryOwnerName", libraryOwnerName); } registry.RegisterModuleInterface <ISystemAccountService> (this); m_registry = registry; m_config = config; }
public virtual void Configure(IConfigSource config, IRegistryCore registry) { m_registry = registry; m_database = Framework.Utilities.DataManager.RequestPlugin <IAssetDataPlugin>(); registry.RegisterModuleInterface <IAssetService>(this); IConfig handlers = config.Configs["Handlers"]; if (handlers != null) { doDatabaseCaching = handlers.GetBoolean("AssetHandlerUseCache", false); } if (MainConsole.Instance != null && !DoRemoteCalls) { MainConsole.Instance.Commands.AddCommand( "show digest", "show digest <ID>", "Show asset digest", HandleShowDigest, false, true); MainConsole.Instance.Commands.AddCommand( "delete asset", "delete asset <ID>", "Delete asset from database", HandleDeleteAsset, false, true); MainConsole.Instance.Commands.AddCommand("get asset", "get asset <ID>", "Gets info about asset from database", HandleGetAsset, false, true); } MainConsole.Instance.Debug("[ASSET SERVICE]: Local asset service enabled"); }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("GridHandler", "") != Name) { return; } string localHandler = handlerConfig.GetString("LocalGridHandler", "GridService"); List <IGridService> services = AuroraModuleLoader.PickupModules <IGridService>(); #if (!ISWIN) foreach (IGridService s in services) { if (s.GetType().Name == localHandler) { m_localService = s; } } #else foreach (IGridService s in services.Where(s => s.GetType().Name == localHandler)) { m_localService = s; } #endif m_registry = registry; if (m_localService == null) { m_localService = new GridService(); } m_localService.Configure(config, registry); m_remoteService = new GridServicesConnector(); m_remoteService.Initialize(config, registry); registry.RegisterModuleInterface <IGridService>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("FreeSwitchHandler", "") != Name) { return; } // // Try reading the [FreeswitchService] section first, if it exists // IConfig freeswitchConfig = config.Configs["FreeswitchService"]; if (freeswitchConfig != null) { m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty); if (m_freeSwitchDefaultWellKnownIP == String.Empty) { m_log.Debug("[FREESWITCH]: No FreeswitchServerAddress given, can't continue"); return; } m_freeSwitchRealm = freeswitchConfig.GetString("Realm", m_freeSwitchDefaultWellKnownIP); m_freeSwitchSIPProxy = freeswitchConfig.GetString("SIPProxy", m_freeSwitchDefaultWellKnownIP + ":5060"); m_freeSwitchEchoServer = freeswitchConfig.GetString("EchoServer", m_freeSwitchDefaultWellKnownIP); m_freeSwitchEchoPort = freeswitchConfig.GetInt("EchoPort", m_freeSwitchEchoPort); m_freeSwitchAttemptUseSTUN = freeswitchConfig.GetBoolean("AttemptSTUN", false); // This may not work m_freeSwitchDefaultTimeout = freeswitchConfig.GetInt("DefaultTimeout", m_freeSwitchDefaultTimeout); m_freeSwitchContext = freeswitchConfig.GetString("Context", m_freeSwitchContext); m_freeSwitchServerUser = freeswitchConfig.GetString("UserName", m_freeSwitchServerUser); m_freeSwitchServerPass = freeswitchConfig.GetString("Password", m_freeSwitchServerPass); m_Enabled = true; registry.RegisterModuleInterface <IFreeswitchService>(this); } }
public override void Initialize(IConfigSource config, IRegistryCore registry) { IConfig hgConfig = config.Configs["HyperGrid"]; if (hgConfig == null || !hgConfig.GetBoolean("Enabled", false)) { return; } m_registry = registry; _config = config; IConfig agentConfig = config.Configs["AgentProcessing"]; if (agentConfig != null) { m_enabled = agentConfig.GetString("Module", "AgentProcessing") == "HGAgentProcessing"; VariableRegionSight = agentConfig.GetBoolean("UseVariableRegionSightDistance", VariableRegionSight); MaxVariableRegionSight = agentConfig.GetInt("MaxDistanceVariableRegionSightDistance", MaxVariableRegionSight); } if (m_enabled) { m_registry.RegisterModuleInterface <IAgentProcessing> (this); } }
public void Initialize(IConfigSource config, IRegistryCore registry) { if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand("save archive", "save archive", "Saves an Aurora Archive", SaveAuroraArchive); MainConsole.Instance.Commands.AddCommand("load archive", "load archive", "Loads an Aurora Archive", LoadAuroraArchive); } //Register the extention const string ext = ".abackup"; try { RegistryKey key = Registry.ClassesRoot.CreateSubKey(ext + "\\DefaultIcon"); key.SetValue("", Application.StartupPath + "\\CrateDownload.ico"); key.Close(); } catch { } //Register the interface registry.RegisterModuleInterface <IAuroraBackupArchiver>(this); }
public void Initialize(IConfigSource config, IRegistryCore registry) { if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand( "save archive", "save archive", "Saves a WhiteCore '.abackup' archive (deprecated)", SaveWhiteCoreArchive, true, false); MainConsole.Instance.Commands.AddCommand( "load archive", "load archive", "Loads a WhiteCore '.abackup' archive", LoadWhiteCoreArchive, true, false); } #if ISWIN //Register the extension const string ext = ".abackup"; try { if (Util.IsWindows()) { RegistryKey key = Registry.ClassesRoot.CreateSubKey(ext + "\\DefaultIcon"); key.SetValue("", Application.StartupPath + "\\CrateDownload.ico"); key.Close(); } } catch { } #endif //Register the interface registry.RegisterModuleInterface <IWhiteCoreBackupArchiver> (this); }
public virtual void Initialize(IConfigSource config, IRegistryCore registry) { IConfig handlerConfig = config.Configs["Handlers"]; if (handlerConfig.GetString("InventoryHandler", "") != Name) { return; } IConfig invConfig = config.Configs["InventoryService"]; if (invConfig != null) { m_AllowDelete = invConfig.GetBoolean("AllowDelete", true); } if (MainConsole.Instance != null) { MainConsole.Instance.Commands.AddCommand("fix inventory", "fix inventory", "If the user's inventory has been corrupted, this function will attempt to fix it", FixInventory); } registry.RegisterModuleInterface <IInventoryService>(this); }
// bool m_enabled; #region Implementation of IService /// <summary> /// Set up and register the module /// </summary> /// <param name="config">Config file</param> /// <param name="registry">Place to register the modules into</param> public void Initialize(IConfigSource config, IRegistryCore registry) { registry.RegisterModuleInterface <IScheduleService> (this); Init(registry, "Scheduler"); }
public void Initialize(IConfigSource config, IRegistryCore registry) { m_registry = registry; m_registry.RegisterModuleInterface <IGroupNotificationService>(this); }