2007-03-01 23:49:08 +01:00
|
|
|
/**
|
2007-03-22 22:50:20 +01:00
|
|
|
* vim: set ts=4 :
|
|
|
|
* ===============================================================
|
|
|
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
|
|
|
* ===============================================================
|
|
|
|
*
|
|
|
|
* This file is not open source and may not be copied without explicit
|
|
|
|
* written permission of AlliedModders LLC. This file may not be redistributed
|
|
|
|
* in whole or significant part.
|
|
|
|
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
|
|
|
|
*
|
|
|
|
* Version: $Id$
|
|
|
|
*/
|
2007-03-01 23:49:08 +01:00
|
|
|
|
2007-03-10 22:26:04 +01:00
|
|
|
#include "UserMessages.h"
|
2007-03-01 23:49:08 +01:00
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
UserMessages g_UserMsgs;
|
2007-03-01 23:49:08 +01:00
|
|
|
|
|
|
|
SH_DECL_HOOK2(IVEngineServer, UserMessageBegin, SH_NOATTRIB, 0, bf_write *, IRecipientFilter *, int);
|
|
|
|
SH_DECL_HOOK0_void(IVEngineServer, MessageEnd, SH_NOATTRIB, 0);
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
UserMessages::UserMessages() : m_InterceptBuffer(m_pBase, 2500)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
m_Names = sm_trie_create();
|
|
|
|
m_HookCount = 0;
|
|
|
|
m_InExec = false;
|
|
|
|
m_InHook = false;
|
|
|
|
m_CurFlags = 0;
|
|
|
|
m_CurId = INVALID_MESSAGE_ID;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
UserMessages::~UserMessages()
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
sm_trie_destroy(m_Names);
|
2007-03-17 01:55:46 +01:00
|
|
|
|
|
|
|
CStack<ListenerInfo *>::iterator iter;
|
|
|
|
for (iter=m_FreeListeners.begin(); iter!=m_FreeListeners.end(); iter++)
|
|
|
|
{
|
|
|
|
delete (*iter);
|
|
|
|
}
|
|
|
|
m_FreeListeners.popall();
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
void UserMessages::OnSourceModAllInitialized()
|
2007-03-03 01:56:01 +01:00
|
|
|
{
|
|
|
|
g_ShareSys.AddInterface(NULL, this);
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
void UserMessages::OnSourceModAllShutdown()
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
if (m_HookCount)
|
|
|
|
{
|
2007-03-15 05:45:17 +01:00
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
m_HookCount = 0;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
int UserMessages::GetMessageIndex(const char *msg)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
int msgid;
|
2007-04-15 07:43:43 +02:00
|
|
|
|
2007-03-01 23:49:08 +01:00
|
|
|
if (!sm_trie_retrieve(m_Names, msg, reinterpret_cast<void **>(&msgid)))
|
|
|
|
{
|
2007-04-15 07:43:43 +02:00
|
|
|
msgid = g_SMAPI->FindUserMessage(msg);
|
2007-03-01 23:49:08 +01:00
|
|
|
|
2007-04-15 07:43:43 +02:00
|
|
|
if (msgid != INVALID_MESSAGE_ID)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-04-15 07:43:43 +02:00
|
|
|
sm_trie_insert(m_Names, msg, reinterpret_cast<void *>(msgid));
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return msgid;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bf_write *UserMessages::StartMessage(int msg_id, cell_t players[], unsigned int playersNum, int flags)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
bf_write *buffer;
|
2007-03-11 04:04:39 +01:00
|
|
|
|
|
|
|
if (m_InExec || m_InHook)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
if (msg_id < 0 || msg_id >= 255)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
m_CellRecFilter.Initialize(players, playersNum);
|
2007-03-01 23:49:08 +01:00
|
|
|
|
|
|
|
m_CurFlags = flags;
|
|
|
|
if (m_CurFlags & USERMSG_INITMSG)
|
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
m_CellRecFilter.SetToInit(true);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
if (m_CurFlags & USERMSG_RELIABLE)
|
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
m_CellRecFilter.SetToReliable(true);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
m_InExec = true;
|
|
|
|
|
|
|
|
if (m_CurFlags & (USERMSG_PASSTHRU_ALL|USERMSG_PASSTHRU))
|
|
|
|
{
|
|
|
|
buffer = engine->UserMessageBegin(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
|
|
|
|
} else {
|
|
|
|
buffer = ENGINE_CALL(UserMessageBegin)(static_cast<IRecipientFilter *>(&m_CellRecFilter), msg_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
return buffer;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bool UserMessages::EndMessage()
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
if (!m_InExec)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_CurFlags & (USERMSG_PASSTHRU_ALL|USERMSG_PASSTHRU))
|
|
|
|
{
|
|
|
|
engine->MessageEnd();
|
|
|
|
} else {
|
|
|
|
ENGINE_CALL(MessageEnd)();
|
|
|
|
}
|
|
|
|
|
|
|
|
m_InExec = false;
|
|
|
|
m_CurFlags = 0;
|
2007-03-11 04:04:39 +01:00
|
|
|
m_CellRecFilter.Reset();
|
2007-03-01 23:49:08 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bool UserMessages::HookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
if (msg_id < 0 || msg_id >= 255)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
ListenerInfo *pInfo;
|
|
|
|
if (m_FreeListeners.empty())
|
|
|
|
{
|
|
|
|
pInfo = new ListenerInfo;
|
|
|
|
} else {
|
|
|
|
pInfo = m_FreeListeners.front();
|
|
|
|
m_FreeListeners.pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
pInfo->Callback = pListener;
|
|
|
|
pInfo->IsHooked = false;
|
|
|
|
pInfo->KillMe = false;
|
|
|
|
|
2007-03-01 23:49:08 +01:00
|
|
|
if (!m_HookCount++)
|
|
|
|
{
|
2007-03-15 05:45:17 +01:00
|
|
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
|
|
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
|
|
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
|
|
|
SH_ADD_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (intercept)
|
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
m_msgIntercepts[msg_id].push_back(pInfo);
|
2007-03-01 23:49:08 +01:00
|
|
|
} else {
|
2007-03-11 04:04:39 +01:00
|
|
|
m_msgHooks[msg_id].push_back(pInfo);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bool UserMessages::UnhookUserMessage(int msg_id, IUserMessageListener *pListener, bool intercept)
|
2007-03-11 04:04:39 +01:00
|
|
|
{
|
|
|
|
MsgList *pList;
|
2007-03-01 23:49:08 +01:00
|
|
|
MsgIter iter;
|
2007-03-11 04:04:39 +01:00
|
|
|
ListenerInfo *pInfo;
|
2007-03-01 23:49:08 +01:00
|
|
|
bool deleted = false;
|
|
|
|
|
|
|
|
if (msg_id < 0 || msg_id >= 255)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
pList = (intercept) ? &m_msgIntercepts[msg_id] : &m_msgHooks[msg_id];
|
|
|
|
for (iter=pList->begin(); iter!=pList->end(); iter++)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo = (*iter);
|
|
|
|
if (pInfo->Callback == pListener)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
if (pInfo->IsHooked)
|
|
|
|
{
|
|
|
|
pInfo->KillMe = true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
pList->erase(iter);
|
2007-03-01 23:49:08 +01:00
|
|
|
deleted = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
if (deleted)
|
|
|
|
{
|
|
|
|
_DecRefCounter();
|
|
|
|
}
|
|
|
|
|
|
|
|
return deleted;
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
void UserMessages::_DecRefCounter()
|
2007-03-11 04:04:39 +01:00
|
|
|
{
|
|
|
|
if (--m_HookCount == 0)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-15 05:45:17 +01:00
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Pre, false);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, UserMessageBegin, engine, this, &UserMessages::OnStartMessage_Post, true);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Pre, false);
|
|
|
|
SH_REMOVE_HOOK_MEMFUNC(IVEngineServer, MessageEnd, engine, this, &UserMessages::OnMessageEnd_Post, true);
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bf_write *UserMessages::OnStartMessage_Pre(IRecipientFilter *filter, int msg_type)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
bool is_intercept_empty = m_msgIntercepts[msg_type].empty();
|
|
|
|
bool is_hook_empty = m_msgHooks[msg_type].empty();
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
if ((is_intercept_empty && is_hook_empty)
|
|
|
|
|| (m_InExec && !(m_CurFlags & USERMSG_PASSTHRU_ALL)))
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
m_InHook = false;
|
|
|
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_CurId = msg_type;
|
|
|
|
m_CurRecFilter = filter;
|
|
|
|
m_InHook = true;
|
2007-03-11 20:26:47 +01:00
|
|
|
m_BlockEndPost = false;
|
2007-03-01 23:49:08 +01:00
|
|
|
|
|
|
|
if (!is_intercept_empty)
|
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
m_InterceptBuffer.Reset();
|
2007-03-01 23:49:08 +01:00
|
|
|
RETURN_META_VALUE(MRES_SUPERCEDE, &m_InterceptBuffer);
|
|
|
|
}
|
|
|
|
|
|
|
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
bf_write *UserMessages::OnStartMessage_Post(IRecipientFilter *filter, int msg_type)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
if (!m_InHook)
|
|
|
|
{
|
|
|
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_OrigBuffer = META_RESULT_ORIG_RET(bf_write *);
|
|
|
|
|
|
|
|
RETURN_META_VALUE(MRES_IGNORED, NULL);
|
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
void UserMessages::OnMessageEnd_Post()
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 20:26:47 +01:00
|
|
|
if (!m_InHook || m_BlockEndPost)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
RETURN_META(MRES_IGNORED);
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
MsgList *pList;
|
2007-03-01 23:49:08 +01:00
|
|
|
MsgIter iter;
|
2007-03-11 04:04:39 +01:00
|
|
|
ListenerInfo *pInfo;
|
2007-03-01 23:49:08 +01:00
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
pList = &m_msgIntercepts[m_CurId];
|
|
|
|
for (iter=pList->begin(); iter!=pList->end(); )
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo = (*iter);
|
|
|
|
pInfo->IsHooked = true;
|
|
|
|
pInfo->Callback->OnUserMessageSent(m_CurId);
|
|
|
|
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
iter = pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
pInfo->IsHooked = false;
|
|
|
|
iter++;
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
pList = &m_msgHooks[m_CurId];
|
2007-03-11 04:25:28 +01:00
|
|
|
for (iter=pList->begin(); iter!=pList->end(); )
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo = (*iter);
|
2007-03-11 04:25:28 +01:00
|
|
|
pInfo->IsHooked = true;
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo->Callback->OnUserMessageSent(m_CurId);
|
|
|
|
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
iter = pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
pInfo->IsHooked = false;
|
|
|
|
iter++;
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
2007-03-11 04:04:39 +01:00
|
|
|
|
|
|
|
m_InHook = false;
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
2007-03-15 05:45:17 +01:00
|
|
|
void UserMessages::OnMessageEnd_Pre()
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
|
|
|
if (!m_InHook)
|
|
|
|
{
|
|
|
|
RETURN_META(MRES_IGNORED);
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
MsgList *pList;
|
2007-03-01 23:49:08 +01:00
|
|
|
MsgIter iter;
|
2007-03-11 04:04:39 +01:00
|
|
|
ListenerInfo *pInfo;
|
|
|
|
|
2007-03-01 23:49:08 +01:00
|
|
|
ResultType res;
|
|
|
|
bool intercepted = false;
|
|
|
|
bool handled = false;
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
pList = &m_msgIntercepts[m_CurId];
|
|
|
|
for (iter=pList->begin(); iter!=pList->end(); )
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo = (*iter);
|
|
|
|
pInfo->IsHooked = true;
|
|
|
|
res = pInfo->Callback->InterceptUserMessage(m_CurId, &m_InterceptBuffer, m_CurRecFilter);
|
|
|
|
|
2007-03-11 20:26:47 +01:00
|
|
|
intercepted = true;
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
switch (res)
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
case Pl_Stop:
|
|
|
|
{
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
goto supercede;
|
|
|
|
}
|
|
|
|
pInfo->IsHooked = false;
|
|
|
|
goto supercede;
|
|
|
|
}
|
|
|
|
case Pl_Handled:
|
|
|
|
{
|
|
|
|
handled = true;
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
iter = pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
iter = pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
continue;
|
|
|
|
}
|
2007-03-11 20:26:47 +01:00
|
|
|
break;
|
2007-03-11 04:04:39 +01:00
|
|
|
}
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo->IsHooked = false;
|
|
|
|
iter++;
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (handled)
|
|
|
|
{
|
|
|
|
goto supercede;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (intercepted)
|
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
bf_write *engine_bfw;
|
|
|
|
|
2007-03-01 23:49:08 +01:00
|
|
|
engine_bfw = ENGINE_CALL(UserMessageBegin)(m_CurRecFilter, m_CurId);
|
|
|
|
m_ReadBuffer.StartReading(m_InterceptBuffer.GetBasePointer(), m_InterceptBuffer.GetNumBytesWritten());
|
|
|
|
engine_bfw->WriteBitsFromBuffer(&m_ReadBuffer, m_InterceptBuffer.GetNumBitsWritten());
|
|
|
|
ENGINE_CALL(MessageEnd)();
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:04:39 +01:00
|
|
|
pList = &m_msgHooks[m_CurId];
|
|
|
|
for (iter=pList->begin(); iter!=pList->end(); )
|
2007-03-01 23:49:08 +01:00
|
|
|
{
|
2007-03-11 04:04:39 +01:00
|
|
|
pInfo = (*iter);
|
|
|
|
pInfo->IsHooked = true;
|
|
|
|
pInfo->Callback->OnUserMessage(m_CurId, m_OrigBuffer, m_CurRecFilter);
|
|
|
|
|
|
|
|
if (pInfo->KillMe)
|
|
|
|
{
|
|
|
|
iter = pList->erase(iter);
|
|
|
|
m_FreeListeners.push(pInfo);
|
|
|
|
_DecRefCounter();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2007-03-11 04:25:28 +01:00
|
|
|
pInfo->IsHooked = false;
|
2007-03-11 04:04:39 +01:00
|
|
|
iter++;
|
2007-03-01 23:49:08 +01:00
|
|
|
}
|
|
|
|
|
2007-03-11 20:26:47 +01:00
|
|
|
RETURN_META((intercepted) ? MRES_SUPERCEDE : MRES_IGNORED);
|
2007-03-01 23:49:08 +01:00
|
|
|
supercede:
|
2007-03-11 04:04:39 +01:00
|
|
|
m_InHook = false;
|
2007-03-11 20:26:47 +01:00
|
|
|
m_BlockEndPost = true;
|
2007-03-01 23:49:08 +01:00
|
|
|
RETURN_META(MRES_SUPERCEDE);
|
|
|
|
}
|