Update extension.cpp

This commit is contained in:
zaCade 2019-05-20 17:52:15 +02:00
parent 7a281ce81a
commit 571c1e0409

View File

@ -59,8 +59,6 @@ CDetour *g_pDetour_RecvFrom = NULL;
*/ */
DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flags, sockaddr *, to, socklen_t*, tolen) DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flags, sockaddr *, to, socklen_t*, tolen)
{ {
int retval = DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen);
if (memcmp(buf, A2S_INFO_REPLY, 5) == 0) if (memcmp(buf, A2S_INFO_REPLY, 5) == 0)
{ {
g_pSM->LogMessage(myself, "A2S_INFO_REPLY: %s", buf); g_pSM->LogMessage(myself, "A2S_INFO_REPLY: %s", buf);
@ -71,7 +69,7 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
g_pSM->LogMessage(myself, "A2S_PLAYER_REPLY: %s", buf); g_pSM->LogMessage(myself, "A2S_PLAYER_REPLY: %s", buf);
} }
return retval; return DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen);
} }
/** /**
@ -79,8 +77,6 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
*/ */
DETOUR_DECL_STATIC6(Detour_RecvFrom, int, int, s, char *, buf, int, len, int, flags, sockaddr *, from, socklen_t*, fromlen) DETOUR_DECL_STATIC6(Detour_RecvFrom, int, int, s, char *, buf, int, len, int, flags, sockaddr *, from, socklen_t*, fromlen)
{ {
int retval = DETOUR_STATIC_CALL(Detour_RecvFrom)(s, buf, len, flags, from, fromlen);
// if (memcmp(buf, A2S_INFO_REQUEST, 5) == 0) // if (memcmp(buf, A2S_INFO_REQUEST, 5) == 0)
// { // {
// g_pSM->LogMessage(myself, "A2S_INFO_REQUEST: %s", buf); // g_pSM->LogMessage(myself, "A2S_INFO_REQUEST: %s", buf);
@ -91,7 +87,7 @@ DETOUR_DECL_STATIC6(Detour_RecvFrom, int, int, s, char *, buf, int, len, int, fl
// g_pSM->LogMessage(myself, "A2S_PLAYER_REQUEST: %s", buf); // g_pSM->LogMessage(myself, "A2S_PLAYER_REQUEST: %s", buf);
// } // }
return retval; return DETOUR_STATIC_CALL(Detour_RecvFrom)(s, buf, len, flags, from, fromlen);
} }
/** /**