Skip to content

Commit debd6cb

Browse files
committed
Add unsupported term warning
This adds a warning message for unix users using a terminal other than screen or xterm. This is only temporary until a fallback communication method for the compiler is written.
1 parent f5fad96 commit debd6cb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/OxideMod.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,26 @@ public void Load()
225225

226226
LogInfo("Loading Oxide Core v{0}...", Version);
227227

228+
if (Environment.OSVersion.Platform == PlatformID.Unix)
229+
{
230+
if (!CommandLine.HasVariable("ignore-term-warning"))
231+
{
232+
string term = Environment.GetEnvironmentVariable("TERM")?.ToLowerInvariant();
233+
234+
switch (term)
235+
{
236+
case "screen":
237+
case "xterm":
238+
break;
239+
240+
default:
241+
LogWarning($"Terminal {term} has been detected, plugin compiler may not work as expected.");
242+
LogWarning("If you are using LGSM please refer to https://github.com/GameServerManagers/LinuxGSM/issues/4267");
243+
break;
244+
}
245+
}
246+
}
247+
228248
RootPluginManager = new PluginManager(RootLogger) { ConfigPath = ConfigDirectory };
229249
extensionManager = new ExtensionManager(RootLogger);
230250
DataFileSystem = new DataFileSystem(DataDirectory);

0 commit comments

Comments
 (0)