-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Monera
committed
Aug 29, 2023
1 parent
765a6a4
commit 2916413
Showing
7 changed files
with
151 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#if defined _pluginsyswrapper_included_ | ||
#endinput | ||
#endif | ||
#define _pluginsyswrapper_included_ | ||
|
||
public Extension __ext_pluginsyswrapper = | ||
{ | ||
name = "PluginSys Wrapper", | ||
file = "pluginsyswrapper.ext", | ||
autoload = 1, | ||
required = 1, | ||
}; | ||
|
||
enum HandleError | ||
{ | ||
HandleError_None = 0, /**< No error */ | ||
HandleError_Changed, /**< The handle has been freed and reassigned */ | ||
HandleError_Type, /**< The handle has a different type registered */ | ||
HandleError_Freed, /**< The handle has been freed */ | ||
HandleError_Index, /**< generic internal indexing error */ | ||
HandleError_Access, /**< No access permitted to free this handle */ | ||
HandleError_Limit, /**< The limited number of handles has been reached */ | ||
HandleError_Identity, /**< The identity token was not usable */ | ||
HandleError_Owner, /**< Owners do not match for this operation */ | ||
HandleError_Version, /**< Unrecognized security structure version */ | ||
HandleError_Parameter, /**< An invalid parameter was passed */ | ||
HandleError_NoInherit, /**< This type cannot be inherited */ | ||
}; | ||
|
||
/** | ||
* @brief Checks if the event is hooked by the plugin. | ||
* | ||
* @param plugin Handle of the plugin. | ||
* @param name Name of the event. | ||
* @param err Error, set on handle failure. | ||
* @return True if the event is hooked, false otherwise. | ||
*/ | ||
native bool IsEventHookedEx(Handle plugin, const char[] name, HandleError &err); | ||
|
||
/** | ||
* @brief Checks if the event is hooked by the plugin. | ||
* | ||
* @param plugin Handle of the plugin. | ||
* @param name Name of the event. | ||
* @return True if the event is hooked, false otherwise. | ||
*/ | ||
stock bool IsEventHooked(Handle plugin, const char[] name) | ||
{ | ||
HandleError err; | ||
return IsEventHookedEx(plugin, name, err); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters