Raised This Month: $89 Target: $400
 22% 

There's no reason why client_disconnected forward should exist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-19-2019 , 11:44   There's no reason why client_disconnected forward should exist
Reply With Quote #1

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.
__________________
<VeCo> is offline
Gabe Iggy
Veteran Member
Join Date: Mar 2011
Location: Chile
Old 06-19-2019 , 15:46   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #2

client_disconnected is already superior to client_disconnect, the latter is kept to ensure backwards compatibility.
__________________
Gabe Iggy is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-19-2019 , 16:29   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #3

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.
__________________

Last edited by <VeCo>; 06-19-2019 at 16:30.
<VeCo> is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-19-2019 , 17:45   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #4

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.
__________________

Last edited by KliPPy; 06-19-2019 at 17:46.
KliPPy is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-20-2019 , 10:24   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #5

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.
__________________

Last edited by <VeCo>; 06-20-2019 at 10:26.
<VeCo> is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 06-20-2019 , 19:34   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #6

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.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-21-2019 , 07:33   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #7

Yes, the naming was a mistake, but it has to exist as a separate forward.
__________________
KliPPy is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-21-2019 , 10:33   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #8

No need to be deprecated then, uh.
__________________
<VeCo> is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-21-2019 , 15:18   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #9

That's actually a good point. Not sure what to do here, better wait for Arkshine to clear things up.
__________________
KliPPy is offline
rtxa
Member
Join Date: Mar 2018
Old 06-22-2019 , 13:01   Re: There's no reason why client_disconnected forward should exist
Reply With Quote #10

client_disconnected() mess with AFK Kickers plugins when sv is using FastDL
rtxa is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:09.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode