public static ServerAddress func_78860_a(String par0Str)
    {
        if (par0Str == null)
        {
            return null;
        }

        String as[] = par0Str.split(":");

        if (par0Str.startsWith("["))
        {
            int i = par0Str.indexOf("]");

            if (i > 0)
            {
                String s1 = par0Str.substring(1, i);
                String s2 = par0Str.substring(i + 1).trim();

                if (s2.startsWith(":") && s2.length() > 0)
                {
                    s2 = s2.substring(1);
                    as = new String[2];
                    as[0] = s1;
                    as[1] = s2;
                }
                else
                {
                    as = new String[1];
                    as[0] = s1;
                }
            }
        }

        if (as.length > 2)
        {
            as = new String[1];
            as[0] = par0Str;
        }

        String s = as[0];
        int j = as.length <= 1 ? 25565 : func_78862_a(as[1], 25565);

        if (j == 25565)
        {
            String as1[] = func_78863_b(s);
            s = as1[0];
            j = func_78862_a(as1[1], 25565);
        }

        return new ServerAddress(s, j);
    }