Esempio n. 1
0
 public static bool IsValid(string name)
 {
     try
     {
         WorldNameResolver.GetID(name);
         return(true);
     }
     catch (ArgumentException)
     {
         return(false);
     }
 }
Esempio n. 2
0
        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();
            }
        }