예제 #1
0
    public IEnumerator AuthorisationRoutine(Connection connection)
    {
        yield return(StartCoroutine(Auth_Steam.Run(connection)));

        yield return(StartCoroutine(Auth_EAC.Run(connection)));

        yield return(StartCoroutine(Auth_CentralizedBans.Run(connection)));

        if (!connection.rejected && connection.active)
        {
            if (IsAuthed(connection.userid))
            {
                Reject(connection, "You are already connected as a player!");
            }
            else
            {
                Approve(connection);
            }
        }
    }
예제 #2
0
    public IEnumerator AuthorisationRoutine(Connection connection)
    {
        ConnectionAuth connectionAuth = this;

        yield return((object)connectionAuth.StartCoroutine(Auth_Steam.Run(connection)));

        yield return((object)connectionAuth.StartCoroutine(Auth_EAC.Run(connection)));

        if (connection.rejected == null && connection.active != null)
        {
            BasePlayer byId = BasePlayer.FindByID((ulong)connection.userid);
            if (Object.op_Implicit((Object)byId) && byId.net.get_connection() != null)
            {
                ConnectionAuth.Reject(connection, "You are already connected as a player!");
            }
            else
            {
                connectionAuth.Approve(connection);
            }
        }
    }
    public IEnumerator AuthorisationRoutine(Connection connection)
    {
        ConnectionAuth connectionAuth = null;

        yield return(connectionAuth.StartCoroutine(Auth_Steam.Run(connection)));

        yield return(connectionAuth.StartCoroutine(Auth_EAC.Run(connection)));

        if (connection.rejected || !connection.active)
        {
            yield break;
        }
        BasePlayer basePlayer = BasePlayer.FindByID(connection.userid);

        if (basePlayer && basePlayer.net.connection != null)
        {
            ConnectionAuth.Reject(connection, "You are already connected as a player!");
            yield break;
        }
        connectionAuth.Approve(connection);
    }