Terraria.Netplay.IsBanned C# (CSharp) Method

IsBanned() public static method

public static IsBanned ( RemoteAddress address ) : bool
address Terraria.Net.RemoteAddress
return bool
        public static bool IsBanned(RemoteAddress address)
        {
            try
            {
                string identifier = address.GetIdentifier();
                if (System.IO.File.Exists(Netplay.BanFilePath))
                {
                    using (StreamReader streamReader = new StreamReader(Netplay.BanFilePath))
                    {
                        string str;
                        while ((str = streamReader.ReadLine()) != null)
                        {
                            if (str == identifier)
                                return true;
                        }
                    }
                }
            }
            catch
            {
                return false;
            }

            return false;
        }