DarkEmu_GameServer.Systems.checkSameChar C# (CSharp) Метод

checkSameChar() публичный Метод

public checkSameChar ( string name, int id ) : void
name string
id int
Результат void
        void checkSameChar(string name, int id)
        {
            //Wrap our function inside a catcher
            try
            {
                //Lock the client
                lock (Systems.clients)
                {
                    //For each client currently connected
                    for (int i = 0; i < Systems.clients.Count; i++)
                    {
                        //If the client is null, or the client character name is same as our login name
                        if (Systems.clients[i] != null && Systems.clients[i].Character.Information.Name == name || Systems.clients[i].Character.Information.UniqueID == id)
                        {
                            //Disconnect the user
                            Systems.clients[i].Disconnect("normal");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Check same character error {0}", ex);
                Systems.Debugger.Write(ex);
            }
        }
Systems