AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   There's no reason why client_disconnected forward should exist (https://forums.alliedmods.net/showthread.php?t=316952)

<VeCo> 06-19-2019 11:44

There's no reason why client_disconnected forward should exist
 
I don't care if people already made plugins using it, it's an "unstable dev" version. You either acknowledge it as an official release or you fix your shit. :salty:

gabuch2 06-19-2019 15:46

Re: There's no reason why client_disconnected forward should exist
 
client_disconnected is already superior to client_disconnect, the latter is kept to ensure backwards compatibility.

<VeCo> 06-19-2019 16:29

Re: There's no reason why client_disconnected forward should exist
 
They can just replace the old one with the new one without changing the name. It's deprecated anyway, the additional parameters aren't a problem.

klippy 06-19-2019 17:45

Re: There's no reason why client_disconnected forward should exist
 
I believe they are not called at exactly the same time. If the old forward was just replaced with the new one there could be some behavior changes in plugins. I.e, as Gabe said, it would break backwards compatibility.

<VeCo> 06-20-2019 10:24

Re: There's no reason why client_disconnected forward should exist
 
The old forward was simply bugged, everyone expected it to catch all disconnects, because that's what it was supposed to do. Even if such a case exists that would strictly warrant the use of the old unreliable behavior (it doesn't), the fact that the forward is deprecated, means it would be strongly discouraged anyway.

Doing shit like this...
PHP Code:

#if !defined client_disconnected
#define client_disconnected client_disconnect
#endif 

...just so you don't accidentally leave a ghost function that would never get called in an older AMXX version, is a retarded design. It serves the same purpose as having only 1 forward from within AMXX, as it should be.

meTaLiCroSS 06-20-2019 19:34

Re: There's no reason why client_disconnected forward should exist
 
Quoting:

Quote:

client_disconnected name is a bit strange, it looks like client_disconnect_post, but really it is advanced client_disconnect which is called even when player disconnects in connecting state.
I guess there are a group of plugins which don't expect to catch that behaviour, and that would just break compatibility on many plugins. Also, client_disconnected is directly a hook of SV_DropClient, which has nothing to do with engine's pfnClientDisconnect which doesn't cover some scenarios, and that's the main reason. You should start to read more the reasons why.

klippy 06-21-2019 07:33

Re: There's no reason why client_disconnected forward should exist
 
Yes, the naming was a mistake, but it has to exist as a separate forward.

<VeCo> 06-21-2019 10:33

Re: There's no reason why client_disconnected forward should exist
 
No need to be deprecated then, uh.

klippy 06-21-2019 15:18

Re: There's no reason why client_disconnected forward should exist
 
That's actually a good point. Not sure what to do here, better wait for Arkshine to clear things up.

rtxa 06-22-2019 13:01

Re: There's no reason why client_disconnected forward should exist
 
client_disconnected() mess with AFK Kickers plugins when sv is using FastDL


All times are GMT -4. The time now is 06:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.