Add getter for Event.BroadcastDisabled (#946)
In a pre-hook, the hook param is not reliable if multiple plugins have hooked the same event.
This commit is contained in:
@@ -56,6 +56,7 @@ typeset EventHook
|
||||
// this event has set the hook mode EventHookMode_PostNoCopy.
|
||||
// @param name String containing the name of the event.
|
||||
// @param dontBroadcast True if event was not broadcast to clients, false otherwise.
|
||||
// May not correspond to the real value. Use the property BroadcastDisabled.
|
||||
// @return Ignored for post hooks. Plugin_Handled will block event if hooked as pre.
|
||||
///
|
||||
function Action (Event event, const char[] name, bool dontBroadcast);
|
||||
@@ -160,6 +161,7 @@ methodmap Event < Handle
|
||||
// or HookEventEx callbacks.
|
||||
property bool BroadcastDisabled {
|
||||
public native set(bool dontBroadcast);
|
||||
public native get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,4 +339,4 @@ native void GetEventName(Handle event, char[] name, int maxlength);
|
||||
* @param dontBroadcast True to disable broadcasting, false otherwise.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native void SetEventBroadcast(Handle event, bool dontBroadcast);
|
||||
native void SetEventBroadcast(Handle event, bool dontBroadcast);
|
||||
Reference in New Issue
Block a user