summaryrefslogtreecommitdiff
path: root/Main.cs
diff options
context:
space:
mode:
authorSarah B <git@sarahduck.ca>2024-01-22 18:22:31 -0800
committerSarah B <git@sarahduck.ca>2024-01-22 18:22:31 -0800
commit3f4fe74715124357ba3341e635fdb2bda3fcd92d (patch)
treecff33fd322e7a9ad1f5cb0a75adf77341d60ebea /Main.cs
parent5be6cc2168c4efe5f72f5b9ef52ca48c26523bc2 (diff)
Updated LiteNetLib to 1.2.0
Diffstat (limited to 'Main.cs')
-rw-r--r--Main.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Main.cs b/Main.cs
index ef901b5..b1793fd 100644
--- a/Main.cs
+++ b/Main.cs
@@ -40,7 +40,10 @@ static class OnekoOnline
Server = new(port, Config.GetValue("ServerMaxUsers", 32));
Client = new("127.0.0.1", port, serverPassword);
} else {
- Client = new(Config.GetValue("ServerIP", "pond.sarahduck.ca"), port, serverPassword);
+ string Address = Config.GetValue("ServerIP", "pond.sarahduck.ca");
+
+ if (string.IsNullOrEmpty(Address)) Console.WriteLine("Server IP empty or invalid, you're offline.");
+ else Client = new(Address, port, serverPassword);
}
Net.Client.UserConnected += OnekoNet.SpawnNetNeko;
Net.Client.UserConnected += MouseNet.SpawnNetMouse;