diff --git a/Facepunch.Steamworks/Client/ClientAuth.cs b/Facepunch.Steamworks/Client/ClientAuth.cs index 272d27c..5479fde 100644 --- a/Facepunch.Steamworks/Client/ClientAuth.cs +++ b/Facepunch.Steamworks/Client/ClientAuth.cs @@ -7,11 +7,9 @@ internal class ClientAuth : Auth { private Client _client; - public ClientAuth( Client client ) + public ClientAuth( Client client ) : base( client ) { _client = client; - _client.RegisterCallback( OnAuthTicketValidate ); - _client.RegisterCallback( OnGetAuthSessionTicketResponseThing ); } public unsafe override Ticket GetAuthSessionTicket() diff --git a/Facepunch.Steamworks/Interfaces/Auth.cs b/Facepunch.Steamworks/Interfaces/Auth.cs index fffc079..0f10a75 100644 --- a/Facepunch.Steamworks/Interfaces/Auth.cs +++ b/Facepunch.Steamworks/Interfaces/Auth.cs @@ -33,6 +33,12 @@ public enum AuthStatus : int PublisherIssuedBan = SteamNative.AuthSessionResponse.PublisherIssuedBan } + public Auth( BaseSteamworks instance ) + { + instance.RegisterCallback( OnAuthTicketValidate ); + instance.RegisterCallback( OnGetAuthSessionTicketResponseThing ); + } + /// /// This is ran whenever the status of an ongoing session changes /// SteamId, OwnerSteamId, Status diff --git a/Facepunch.Steamworks/Server/ServerAuth.cs b/Facepunch.Steamworks/Server/ServerAuth.cs index 94e47c4..ffe1a50 100644 --- a/Facepunch.Steamworks/Server/ServerAuth.cs +++ b/Facepunch.Steamworks/Server/ServerAuth.cs @@ -7,11 +7,9 @@ internal class ServerAuth : Auth { private Server _server; - public ServerAuth( Server server ) + public ServerAuth( Server server ) : base( server ) { _server = server; - _server.RegisterCallback( OnAuthTicketValidate ); - _server.RegisterCallback( OnGetAuthSessionTicketResponseThing ); } public unsafe override Ticket GetAuthSessionTicket()