sourcemod
sourcemod copied to clipboard
Add OnKickClient() forward
This forward allow kick to be detected (ie catch kick reason) or block kicking process.
I think it is possible to hook the common PerformKick() (kick and kicked commands) (from engine/host_cmd.cpp) to call not only from the SourceMod abstraction trigger
Or even more common, can use CBaseClient::Disconnect() with a reason
I think it is possible to hook the common PerformKick() (kick and kicked commands) (from engine/host_cmd.cpp) to call not only from the SourceMod abstraction trigger
@Wend4r I have used the same design as BanClient (ie banid with forwards OnBanClient, OnBanIdentity, OnRemoveBan)
Or even more common, can use
CBaseClient::Disconnect()with a reason
@Wend4r For CBaseClient::Disconnect(), we dont want to have the disconnect reason! Here we want to detect a kick and if needed catch the reason when a player/bot/tv etc is kicked
Regards
For CBaseClient::Disconnect(), we dont want to have the disconnect reason! Here we want to detect a kick and if needed catch the reason when a player/bot/tv etc is kicked
@GabenManPowered In this regard, I suggest adding an reason argument to OnClientDisconnect()/OnClientDisconnected() by CBaseClient::Disconnect()
From the kick follows disconnecting with the kick reason
I think its fine for the moment to used the same design as BanClient.
I apologize for the delay on this.
Functionally this looks ok, but what's the use-case? In what situation would you need to deny a kick? We have immunity rules that should take care of this so I'm coming to this from a place of ignorance.
I dont have a reason to block a kick, but it would be wonderful to have at least a fwd for when it gets called instead of rolling my own impl
I'm also against the idea to block kicks on the fly, as stated by Kyle the permission system more than cover this aspect. If one truly wants control over the game kick system, then they should do what one would when it comes to anything game related, and dhook the engine kick function.
But I agree with sappho, having a notification forwards for kicks could have its benefits, but I can't think of any right now.
Can you make this a Post notification for now?