Improved user message interception API (bug 3631, r=pred).

This commit is contained in:
David Anderson
2009-03-01 16:39:25 -05:00
parent 0c028ca9d0
commit 96a3671bb6
8 changed files with 128 additions and 20 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
#include <version>
/** If this gets changed, you need to update Core's check. */
#define SOURCEMOD_PLUGINAPI_VERSION 4
#define SOURCEMOD_PLUGINAPI_VERSION 5
struct PlVers
{
+4 -3
View File
@@ -127,11 +127,12 @@ native EndMessage();
functag public Action:MsgHook(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init);
/**
* Called when a message is finished sending.
* Called when a message hook has completed.
*
* @param msg_id Message index.
* @param sent True if message was sent, false if blocked.
*/
functag public MsgSentNotify(UserMsg:msg_id);
functag public MsgPostHook(UserMsg:msg_id, bool:sent);
/**
* Hooks a user message.
@@ -145,7 +146,7 @@ functag public MsgSentNotify(UserMsg:msg_id);
* @noreturn
* @error Invalid message index.
*/
native HookUserMessage(UserMsg:msg_id, MsgHook:hook, bool:intercept=false, MsgSentNotify:notify=MsgSentNotify:-1);
native HookUserMessage(UserMsg:msg_id, MsgHook:hook, bool:intercept=false, MsgPostHook:post=MsgPostHook:-1);
/**
* Removes one usermessage hook.