private void Deny(SteamDenyEvent sde) { if (sde.NetUser != null && sde.ClientConnection != null) { if (sde.Reason == "Facepunch_Connector_Cancelled") { sde.ForceAllow = true; } else if (sde.Reason == "Denying entry to " + sde.NetUser.userID + " because they're already connected") { sde.NetUser.Kick(NetError.Facepunch_Kick_Violation, true); } } }
public static void SteamDeny(ClientConnection cc, NetworkPlayerApproval approval, string strReason, NetError errornum) { SteamDenyEvent sde = new SteamDenyEvent(cc, approval, strReason, errornum); if (OnSteamDeny != null) { OnSteamDeny(sde); } if (sde.ForceAllow) { return; } string deny = "Auth failed: " + strReason + " - " + cc.UserName + " (" + cc.UserID.ToString() + ")"; ConsoleSystem.Print(deny, false); approval.Deny((uLink.NetworkConnectionError)errornum); ConnectionAcceptor.CloseConnection(cc); Rust.Steam.Server.OnUserLeave(cc.UserID); }
/*public void OnAirdropCrateDropped(GameObject go) * { * this.Invoke("On_AirdropCrateDropped", new object[] { new Entity(go) }); * }*/ public void OnSteamDeny(SteamDenyEvent e) { this.Invoke("On_SteamDeny", new object[] { e }); }
public void OnSteamDeny(SteamDenyEvent e) { Invoke("On_SteamDeny", e); }