| 545 | bool CHookManager::SendFile(const char *filename, unsigned int transferID, bool isReplayDemo) |
| 546 | #else |
| 547 | bool CHookManager::SendFile(const char *filename, unsigned int transferID) |
| 548 | #endif |
| 549 | { |
| 550 | if (m_netFileSendFwd->GetFunctionCount() == 0) |
| 551 | { |
| 552 | RETURN_META_VALUE(MRES_IGNORED, false); |
| 553 | } |
| 554 | |
| 555 | INetChannel *pNetChannel = META_IFACEPTR(INetChannel); |
| 556 | if (pNetChannel == NULL) |
| 557 | { |
| 558 | RETURN_META_VALUE(MRES_IGNORED, false); |
| 559 | } |
| 560 | |
| 561 | int userid = 0; |
| 562 | IClient *pClient = (IClient *)pNetChannel->GetMsgHandler(); |
| 563 | if (pClient != NULL) |
| 564 | { |
| 565 | userid = pClient->GetUserID(); |
| 566 | } |
| 567 | |
| 568 | cell_t res = Pl_Continue; |
| 569 | m_netFileSendFwd->PushCell(playerhelpers->GetClientOfUserId(userid)); |
| 570 | m_netFileSendFwd->PushString(filename); |
| 571 | m_netFileSendFwd->Execute(&res); |
| 572 | |
| 573 | if (res != Pl_Continue) |
| 574 | { |
| 575 | /* Mimic the Engine. */ |
| 576 | #if (SOURCE_ENGINE >= SE_ALIENSWARM || SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2) |
| 577 | pNetChannel->DenyFile(filename, transferID, isReplayDemo); |
| 578 | #else |
| 579 | pNetChannel->DenyFile(filename, transferID); |
| 580 | #endif |
| 581 | RETURN_META_VALUE(MRES_SUPERCEDE, false); |
| 582 | } |
| 583 | |
| 584 | RETURN_META_VALUE(MRES_IGNORED, false); |
| 585 | } |
| 586 | |
| 587 | #if !defined CLIENTVOICE_HOOK_SUPPORT |
| 588 | bool CHookManager::ProcessVoiceData(CLC_VoiceData *msg) |
nothing calls this directly
no test coverage detected