From 9d6a2b456d8ee36165f3f30f099cb1925b0b0f08 Mon Sep 17 00:00:00 2001 From: jonaslagoni Date: Wed, 8 Jun 2022 02:10:00 +0200 Subject: [PATCH] fix: different environment variable issues --- Oxide.Ext.GamingApi/DefaultPluginInformation.cs | 2 +- Oxide.Ext.GamingApi/GamingApiNats.cs | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Oxide.Ext.GamingApi/DefaultPluginInformation.cs b/Oxide.Ext.GamingApi/DefaultPluginInformation.cs index e16fc72..a5da95b 100644 --- a/Oxide.Ext.GamingApi/DefaultPluginInformation.cs +++ b/Oxide.Ext.GamingApi/DefaultPluginInformation.cs @@ -43,7 +43,7 @@ private DefaultPluginInformation() public static string GetServerId() { - var envName = "BLACKHAWK_SERVER_ID"; + var envName = "GAMINGAPI_SERVER_ID"; var value = Environment.GetEnvironmentVariable(envName); if (value == null) { diff --git a/Oxide.Ext.GamingApi/GamingApiNats.cs b/Oxide.Ext.GamingApi/GamingApiNats.cs index 4e469bc..99594c1 100644 --- a/Oxide.Ext.GamingApi/GamingApiNats.cs +++ b/Oxide.Ext.GamingApi/GamingApiNats.cs @@ -82,22 +82,7 @@ private string GetNatsHost() if (value == null) { Console.WriteLine($"NATS: {envName} environment variable not sat using default value."); - return "nats://localhost:42222"; - } - else - { - return value; - } - } - private string GetServerId() - { - - var envName = "GAMINGAPI_SERVER_ID"; - var value = Environment.GetEnvironmentVariable(envName); - if (value == null) - { - Console.WriteLine($"NATS: {envName} environment variable not sat using default value."); - return "" + 0; + return "nats://localhost:4222"; } else {