Raised This Month: $51 Target: $400
 12% 

Refiring OnClientAuthorized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
the133448
Junior Member
Join Date: Apr 2017
Old 09-13-2017 , 08:06   Refiring OnClientAuthorized
Reply With Quote #1

Hello,

So I was wondering if tehre would be anyway to refire the OnClientAuthorized forward, Im looking into using this plugin https://forums.alliedmods.net/showthread.php?t=297604 and was interested in calling something so the server would reauthorize the client and thus cause other plugins to act as if the client reconnected.
the133448 is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 09-13-2017 , 08:48   Re: Refiring OnClientAuthorized
Reply With Quote #2

You can try using the CreateGlobalForward("OnClientAuthorized",.....); native and call the forward from your plugin.
I've never tried that myself and I don't know if it can create crash/bug within sourcemod, I can't say it's safe but I can't say it works, so just try
__________________

Last edited by Benoist3012; 09-13-2017 at 08:48.
Benoist3012 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 09-13-2017 , 10:08   Re: Refiring OnClientAuthorized
Reply With Quote #3

Quote:
Originally Posted by Benoist3012 View Post
You can try using the CreateGlobalForward("OnClientAuthorized",.....); native and call the forward from your plugin.
I've never tried that myself and I don't know if it can create crash/bug within sourcemod, I can't say it's safe but I can't say it works, so just try
I can safely say it won't create any crashes.
__________________
WildCard65 is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 09-13-2017 , 10:18   Re: Refiring OnClientAuthorized
Reply With Quote #4

Quote:
Originally Posted by WildCard65 View Post
I can safely say it won't create any crashes.
Good to know, I've never came into such situation it's so rare and unlikely, thanks!
Well OP you know what to do now, use CreateGlobalForward native
__________________

Last edited by Benoist3012; 09-13-2017 at 10:18.
Benoist3012 is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-13-2017 , 10:39   Re: Refiring OnClientAuthorized
Reply With Quote #5

You will break the API if you do this; it's also an absolutely awful idea. You're better off creating your own forward.
KyleS is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 09-13-2017 , 10:55   Re: Refiring OnClientAuthorized
Reply With Quote #6

Quote:
Originally Posted by KyleS View Post
You will break the API if you do this; it's also an absolutely awful idea. You're better off creating your own forward.
It probably won't be that bad, if you know what you are doing, I know most don't but still, and I can see some use for this such as stealth admin plugins(I'll probably experiment that idea).

This is the lazy soluce, but some don't want to recompile all plugins I guess, but yeah myself I'd probably never use said soluce, maybe only for the stealth admin plugin.
__________________
Benoist3012 is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 09-13-2017 , 13:22   Re: Refiring OnClientAuthorized
Reply With Quote #7

Quote:
Originally Posted by Benoist3012 View Post
It probably won't be that bad
The quote of confidence right there.
Dr!fter is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 09-13-2017 , 14:37   Re: Refiring OnClientAuthorized
Reply With Quote #8

Quote:
Originally Posted by Dr!fter View Post
The quote of confidence right there.
Lemme play with fire, this is for testing purposes only.

Edit: And if you have common sense you know that you shouldn't spam or call OnBanClient/OnClientPostAdminCheck, but stuff like OnEntityDestroyed is "fine" if you have an extreme good reason to call it.
__________________

Last edited by Benoist3012; 09-13-2017 at 14:43.
Benoist3012 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 09-13-2017 , 20:19   Re: Refiring OnClientAuthorized
Reply With Quote #9

This is such a bad idea we are considering a change to not allow it. I guarantee if you start firing forwards yourself without considering every single other forward SM has and carefully pairing/ordering them, you will break other plugins.
Fyren is offline
Reply



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 00:33.


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