public static bool IsValid(string name) { try { WorldNameResolver.GetID(name); return(true); } catch (ArgumentException) { return(false); } }
public static void Main() { try { ChannelServer.LoginServerConnection = new InteroperabilityClient(new IPEndPoint( Settings.GetIPAddress("Login/IP"), Settings.GetInt("Login/Port")), Settings.GetString("Login/SecurityCode"), WorldNameResolver.GetID(Settings.GetString("Server/World"))); ChannelServer.LoginServerConnection.Loop(); } catch (Exception e) { Log.Error("Server connection failed: \n{0}", e.Message); ChannelServer.Stop(); } }