Exemplo n.º 1
0
 private void OnValidateAuthTicketResponse(ulong SteamId, ulong OwnerId, ServerAuth.Status Status)
 {
     if (Auth_Steam.ValidateConnecting(SteamId, OwnerId, Status))
     {
         return;
     }
     Network.Connection connection = ((IEnumerable <Network.Connection>)((Network.Server)Network.Net.sv).connections).FirstOrDefault <Network.Connection>((Func <Network.Connection, bool>)(x => x.userid == (long)SteamId));
     if (connection == null)
     {
         Debug.LogWarning((object)("Steam gave us a " + (object)Status + " ticket response for unconnected id " + (object)SteamId));
     }
     else if (Status == null)
     {
         Debug.LogWarning((object)("Steam gave us a 'ok' ticket response for already connected id " + (object)SteamId));
     }
     else
     {
         if (Status == 5)
         {
             return;
         }
         connection.authStatus = (__Null)Status.ToString();
         ((Network.Server)Network.Net.sv).Kick(connection, "Steam: " + Status.ToString());
     }
 }
Exemplo n.º 2
0
 private void OnValidateAuthTicketResponse(Steamworks.SteamId SteamId, Steamworks.SteamId OwnerId, AuthResponse Status)
 {
     if (Auth_Steam.ValidateConnecting(SteamId, OwnerId, Status))
     {
         return;
     }
     Network.Connection str = Network.Net.sv.connections.FirstOrDefault <Network.Connection>((Network.Connection x) => x.userid == SteamId);
     if (str == null)
     {
         UnityEngine.Debug.LogWarning(string.Format("Steam gave us a {0} ticket response for unconnected id {1}", Status, SteamId));
         return;
     }
     if (Status == AuthResponse.OK)
     {
         UnityEngine.Debug.LogWarning(string.Format("Steam gave us a 'ok' ticket response for already connected id {0}", SteamId));
         return;
     }
     if (Status == AuthResponse.VACCheckTimedOut)
     {
         return;
     }
     str.authStatus = Status.ToString();
     Network.Net.sv.Kick(str, string.Concat("Steam: ", Status.ToString()));
 }