private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", server.hostname); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", CommandLine.GetVariable("name")); }
private void Init() { // Configure remote logging RemoteLogger.SetTag("game", Title.ToLower()); RemoteLogger.SetTag("game version", Globals.Version); // TODO: Use Covalence // Add core plugin commands AddCovalenceCommand(new[] { "oxide.plugins", "o.plugins", "plugins" }, "PluginsCommand", "oxide.plugins"); AddCovalenceCommand(new[] { "oxide.load", "o.load", "plugin.load" }, "LoadCommand", "oxide.load"); AddCovalenceCommand(new[] { "oxide.reload", "o.reload", "plugin.reload" }, "ReloadCommand", "oxide.reload"); AddCovalenceCommand(new[] { "oxide.unload", "o.unload", "plugin.unload" }, "UnloadCommand", "oxide.unload"); // Add core permission commands AddCovalenceCommand(new[] { "oxide.grant", "o.grant", "perm.grant" }, "GrantCommand", "oxide.grant"); AddCovalenceCommand(new[] { "oxide.group", "o.group", "perm.group" }, "GroupCommand", "oxide.group"); AddCovalenceCommand(new[] { "oxide.revoke", "o.revoke", "perm.revoke" }, "RevokeCommand", "oxide.revoke"); AddCovalenceCommand(new[] { "oxide.show", "o.show", "perm.show" }, "ShowCommand", "oxide.show"); AddCovalenceCommand(new[] { "oxide.usergroup", "o.usergroup", "perm.usergroup" }, "UserGroupCommand", "oxide.usergroup"); // Add core misc commands AddCovalenceCommand(new[] { "oxide.lang", "o.lang" }, "LangCommand"); AddCovalenceCommand(new[] { "oxide.version", "o.version" }, "VersionCommand"); // Register messages for localization foreach (var language in Core.Localization.languages) { lang.RegisterMessages(language.Value, this, language.Key); } // Setup default permission groups if (permission.IsLoaded) { var rank = 0; foreach (var defaultGroup in Interface.Oxide.Config.Options.DefaultGroups) { if (!permission.GroupExists(defaultGroup)) { permission.CreateGroup(defaultGroup, defaultGroup, rank++); } } permission.RegisterValidate(s => { ulong temp; if (!ulong.TryParse(s, out temp)) { return(false); } var digits = temp == 0 ? 1 : (int)Math.Floor(Math.Log10(temp) + 1); return(digits >= 17); }); permission.CleanUp(); } }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", GamePrefs.GetString(EnumGamePrefs.ServerName)); }
public MatrixAgent() { Registry = new RemoteRegistry(); Configuration = new RemoteConfigurator(); Directory = new RemoteDirectory(); Logger = new RemoteLogger(); Gateway = new RemoteGateway(); }
private void OnServerInitialized() { if (serverInitialized) return; serverInitialized = true; permission.MigrateGroup("player", "default"); // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", server.hostname); // Update server console window and status bars RustLegacyExtension.ServerConsole(); }
private void Init() { // Configure remote logging RemoteLogger.SetTag("game", "hurtworld"); RemoteLogger.SetTag("version", GameManager.Instance.GetProtocolVersion().ToString()); // Register messages for localization lang.RegisterMessages(messages, this); // Add general chat commands //cmdlib.AddChatCommand("oxide.plugins", this, "CmdPlugins"); //cmdlib.AddChatCommand("plugins", this, "CmdPlugins"); cmdlib.AddChatCommand("oxide.load", this, "CmdLoad"); cmdlib.AddChatCommand("load", this, "CmdLoad"); cmdlib.AddChatCommand("oxide.unload", this, "CmdUnload"); cmdlib.AddChatCommand("unload", this, "CmdUnload"); cmdlib.AddChatCommand("oxide.reload", this, "CmdReload"); cmdlib.AddChatCommand("reload", this, "CmdReload"); cmdlib.AddChatCommand("oxide.version", this, "CmdVersion"); cmdlib.AddChatCommand("version", this, "CmdVersion"); // Add permission chat commands cmdlib.AddChatCommand("oxide.group", this, "CmdGroup"); cmdlib.AddChatCommand("group", this, "CmdGroup"); cmdlib.AddChatCommand("oxide.usergroup", this, "CmdUserGroup"); cmdlib.AddChatCommand("usergroup", this, "CmdUserGroup"); cmdlib.AddChatCommand("oxide.grant", this, "CmdGrant"); cmdlib.AddChatCommand("grant", this, "CmdGrant"); cmdlib.AddChatCommand("oxide.revoke", this, "CmdRevoke"); cmdlib.AddChatCommand("revoke", this, "CmdRevoke"); cmdlib.AddChatCommand("oxide.show", this, "CmdShow"); cmdlib.AddChatCommand("show", this, "CmdShow"); if (permission.IsLoaded) { var rank = 0; for (var i = DefaultGroups.Length - 1; i >= 0; i--) { var defaultGroup = DefaultGroups[i]; if (!permission.GroupExists(defaultGroup)) { permission.CreateGroup(defaultGroup, defaultGroup, rank++); } } permission.CleanUp(s => { ulong temp; return(ulong.TryParse(s, out temp)); }); } }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", MultiplayerManager.Instance.GameDetails.Name); // Update server console window and status bars FromTheDepthsExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Add 'oxide' and 'modded' tags //SteamGameServer.SetGameTags("oxide,modded"); // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", NetworkController.NetManager_.ServManager.Server_NAME); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Add 'oxide' and 'modded' tags SteamGameServer.SetGameTags("oxide,modded"); // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", GameManager.Instance.ServerConfig.GameName); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", MySandboxGame.ConfigDedicated.ServerName); // Update server console window and status bars SpaceEngineersExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", MyMultiplayer.Static?.HostName); // Update server console window and status bars SpaceEngineersExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", BlockstormExtension.DedicatedServerConfiguration.string_12); // Update server console window and status bars BlockstormExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", Main.worldName); // Update server console window and status bars TerrariaExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", PlayerPrefs.GetString("MpGameName")); // Save the level every X minutes Interface.Oxide.GetLibrary <Timer>().Once(300f, () => LevelSerializer.SaveGame("Game")); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", global::Game.Configuration.Config.Singleton.ServerName); // Update server console window and status bars InterstellarRiftExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", GamePrefs.GetString(EnumGamePrefs.ServerName)); // Update server console window and status bars SevenDaysExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", CommandLine.GetVariable("name")); // Update server console window and status bars NomadExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure the hostname after it has been set RemoteLogger.SetTag("hostname", Provider.serverName); // Update server console window and status bars UnturnedExtension.ServerConsole(); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", ServerConfig.ServerName); // Update server console window and status bars PlanetExplorersExtension.ServerConsole(); }
private void Init() { // Configure remote logging RemoteLogger.SetTag("game", Title.ToLower()); RemoteLogger.SetTag("version", Rust.Defines.Connection.protocol.ToString()); // Add general commands cmdlib.AddConsoleCommand("oxide.plugins", this, "ConsolePlugins"); cmdlib.AddConsoleCommand("global.plugins", this, "ConsolePlugins"); cmdlib.AddConsoleCommand("oxide.load", this, "ConsoleLoad"); cmdlib.AddConsoleCommand("global.load", this, "ConsoleLoad"); cmdlib.AddConsoleCommand("oxide.unload", this, "ConsoleUnload"); cmdlib.AddConsoleCommand("global.unload", this, "ConsoleUnload"); cmdlib.AddConsoleCommand("oxide.reload", this, "ConsoleReload"); cmdlib.AddConsoleCommand("global.reload", this, "ConsoleReload"); cmdlib.AddConsoleCommand("oxide.version", this, "ConsoleVersion"); cmdlib.AddConsoleCommand("global.version", this, "ConsoleVersion"); // Add permission commands cmdlib.AddConsoleCommand("oxide.group", this, "ConsoleGroup"); cmdlib.AddConsoleCommand("global.group", this, "ConsoleGroup"); cmdlib.AddConsoleCommand("oxide.usergroup", this, "ConsoleUserGroup"); cmdlib.AddConsoleCommand("global.usergroup", this, "ConsoleUserGroup"); cmdlib.AddConsoleCommand("oxide.grant", this, "ConsoleGrant"); cmdlib.AddConsoleCommand("global.grant", this, "ConsoleGrant"); cmdlib.AddConsoleCommand("oxide.revoke", this, "ConsoleRevoke"); cmdlib.AddConsoleCommand("global.revoke", this, "ConsoleRevoke"); cmdlib.AddConsoleCommand("oxide.show", this, "ConsoleShow"); cmdlib.AddConsoleCommand("global.show", this, "ConsoleShow"); // Setup the default permission groups if (permission.IsLoaded) { var rank = 0; for (var i = DefaultGroups.Length - 1; i >= 0; i--) { var defaultGroup = DefaultGroups[i]; if (!permission.GroupExists(defaultGroup)) permission.CreateGroup(defaultGroup, defaultGroup, rank++); } permission.RegisterValidate(s => { ulong temp; if (!ulong.TryParse(s, out temp)) return false; var digits = temp == 0 ? 1 : (int)Math.Floor(Math.Log10(temp) + 1); return digits >= 17; }); permission.CleanUp(); } }
private void Init() { // Configure remote logging RemoteLogger.SetTag("game", "rust legacy"); RemoteLogger.SetTag("version", Rust.Defines.Connection.protocol.ToString()); // Add general commands cmdlib.AddConsoleCommand("oxide.plugins", this, "cmdPlugins"); cmdlib.AddConsoleCommand("global.plugins", this, "cmdPlugins"); cmdlib.AddConsoleCommand("oxide.load", this, "cmdLoad"); cmdlib.AddConsoleCommand("global.load", this, "cmdLoad"); cmdlib.AddConsoleCommand("oxide.unload", this, "cmdUnload"); cmdlib.AddConsoleCommand("global.unload", this, "cmdUnload"); cmdlib.AddConsoleCommand("oxide.reload", this, "cmdReload"); cmdlib.AddConsoleCommand("global.reload", this, "cmdReload"); cmdlib.AddConsoleCommand("oxide.version", this, "cmdVersion"); cmdlib.AddConsoleCommand("global.version", this, "cmdVersion"); // Add permission commands cmdlib.AddConsoleCommand("oxide.group", this, "cmdGroup"); cmdlib.AddConsoleCommand("global.group", this, "cmdGroup"); cmdlib.AddConsoleCommand("oxide.usergroup", this, "cmdUserGroup"); cmdlib.AddConsoleCommand("global.usergroup", this, "cmdUserGroup"); cmdlib.AddConsoleCommand("oxide.grant", this, "cmdGrant"); cmdlib.AddConsoleCommand("global.grant", this, "cmdGrant"); cmdlib.AddConsoleCommand("oxide.revoke", this, "cmdRevoke"); cmdlib.AddConsoleCommand("global.revoke", this, "cmdRevoke"); cmdlib.AddConsoleCommand("oxide.show", this, "cmdShow"); cmdlib.AddConsoleCommand("global.show", this, "cmdShow"); // Setup the default permission groups if (permission.IsLoaded) { var rank = 0; for (var i = DefaultGroups.Length - 1; i >= 0; i--) { var defaultGroup = DefaultGroups[i]; if (!permission.GroupExists(defaultGroup)) { permission.CreateGroup(defaultGroup, defaultGroup, rank++); } } permission.CleanUp(s => { ulong temp; return(ulong.TryParse(s, out temp)); }); } }
void Start() { if (remoteLogger) { RemoteLogger.Enable(); } else { RemoteLogger.Disable(); } Debug.Log("Test - Log"); Debug.LogWarning("Test - Warning"); Debug.LogError("Test - Error"); }
private void OnServerInitialized() { if (serverInitialized) { return; } serverInitialized = true; // Configure remote logging RemoteLogger.SetTag("hostname", Provider.serverName); RemoteLogger.SetTag("version", Provider.APP_VERSION); // Update server console window and status bars UnturnedExtension.ServerConsole(); }
/// <summary> /// Loads this extension /// </summary> public override void Load() { // Register our loader Manager.RegisterPluginLoader(new UnityPluginLoader()); // Register engine clock Interface.Oxide.RegisterEngineClock(() => Time.realtimeSinceStartup); // Configure remote logging RemoteLogger.SetTag("os", SystemInfo.operatingSystem); RemoteLogger.SetTag("cpu", SystemInfo.processorType); // Register our MonoBehaviour UnityScript.Create(); }
public static string ActivateIfSpecial(string code) { if (code == SpecialCodes.RELOG0.ToString()) { RemoteLogger.Disable(); return("Remote Logger OFF"); } else if (code == SpecialCodes.RELOG1.ToString()) { RemoteLogger.Enable(); return("Remote Logger ON"); } return(null); }
public void Protect(Action action) { tryagain: try { action(); } catch (Exception ex) { RemoteLogger.ReportIssueAsync(ex); if (HandleException(this, ex)) { goto tryagain; } } }
private void OnServerInitialized() { if (serverInitialized) { return; } Analytics.Collect(); NomadExtension.ServerConsole(); // Configure remote logging RemoteLogger.SetTag("game", Title.ToLower()); RemoteLogger.SetTag("game version", Server.Version); serverInitialized = true; }
protected virtual void ProcessReserialize(RemoteLogger progress) { foreach (var configuration in ResolveConfigurations()) { var logger = configuration.Resolve <ILogger>(); using (new LoggingContext(progress, configuration)) { try { var timer = new Stopwatch(); timer.Start(); logger.Info(configuration.Name + " is being reserialized"); using (new TransparentSyncDisabler()) { var targetDataStore = configuration.Resolve <ITargetDataStore>(); var helper = configuration.Resolve <SerializationHelper>(); // nuke any existing items in the store before we begin. This is a full reserialize so we want to // get rid of any existing stuff even if it's not part of existing configs logger.Warn("[D] Clearing existing items from {0}".FormatWith(targetDataStore.FriendlyName)); targetDataStore.Clear(); var roots = configuration.Resolve <PredicateRootPathResolver>().GetRootSourceItems(); int index = 1; foreach (var root in roots) { helper.DumpTree(root, configuration); progress.ReportProgress((int)((index / (double)roots.Length) * 100)); index++; } } timer.Stop(); logger.Info("{0} reserialization complete in {1}ms".FormatWith(configuration.Name, timer.ElapsedMilliseconds)); } catch (Exception ex) { logger.Error(ex); break; } } } }
private void CompileAssembly(CompilablePlugin[] plugins) { compiler.Compile(plugins, compilation => { if (compilation.compiledAssembly == null) { foreach (var plugin in compilation.plugins) { plugin.OnCompilationFailed(); PluginErrors[plugin.Name] = "Failed to compile: " + plugin.CompilerErrors; Interface.Oxide.LogError("{0} plugin failed to compile!", plugin.ScriptName); Interface.Oxide.LogError(plugin.CompilerErrors); RemoteLogger.Warning($"{plugin.ScriptName} plugin failed to compile!\n{plugin.CompilerErrors}"); } } else { if (compilation.plugins.Count > 0) { var compiled_names = compilation.plugins.Select(pl => pl.Name).ToArray(); var verb = compilation.plugins.Count > 1 ? "were" : "was"; Interface.Oxide.LogInfo($"{compiled_names.ToSentence()} {verb} compiled successfully in {Math.Round(compilation.duration * 1000f)}ms"); } foreach (var plugin in compilation.plugins) { if (plugin.CompilerErrors == null) { Interface.Oxide.UnloadPlugin(plugin.Name); } } foreach (var plugin in compilation.plugins) { if (plugin.CompilerErrors == null) { plugin.OnCompilationSucceeded(compilation.compiledAssembly); } else { plugin.OnCompilationFailed(); PluginErrors[plugin.Name] = "Failed to compile: " + plugin.CompilerErrors; Interface.Oxide.LogError($"Error while compiling {plugin.CompilerErrors}"); } } } }); }