-
Notifications
You must be signed in to change notification settings - Fork 2
/
mute_manager.h
62 lines (45 loc) · 1.67 KB
/
mute_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef MUTEMANAGER_H
#define MUTEMANAGER_H
#ifdef _WIN32
#pragma once
#endif
#include "public/IMuteManager.h"
#include <base_feature.h>
#include <IDetoursAPI.h>
//-----------------------------------------------------------------------------
// Improved Mute Manager
//-----------------------------------------------------------------------------
class CMuteManager : public CBaseFeature, IMuteManager
{
public:
// IMuteManager interface
virtual bool MutePlayer( int index, int flags ) override;
virtual bool UnmutePlayer( int index, int flags ) override;
virtual int GetPlayerMuteFlags( int index ) override;
virtual bool IsInsideChat( void ) override;
virtual void SetInsideChat( bool state ) override;
// CBaseFeature abstract class
virtual bool Load( void ) override;
virtual void PostLoad( void ) override;
virtual void Unload( void ) override;
virtual void Pause( void ) override;
virtual void Unpause( void ) override;
private:
//void *m_pfnCHudBaseTextBlock__Print;
void *m_pfnCVoiceBanMgr__SetPlayerBan;
void *m_pfnCVoiceBanMgr__InternalFindPlayerSquelch;
void *m_pfnCVoiceStatus__IsPlayerBlocked;
void *m_pfnCVoiceStatus__SetPlayerBlockedState;
void *m_pfnCVoiceStatus__UpdateServerState;
void *m_pfnHACK_GetPlayerUniqueID;
//DetourHandle_t m_hCHudBaseTextBlock__Print;
DetourHandle_t m_hCVoiceBanMgr__SetPlayerBan;
DetourHandle_t m_hCVoiceBanMgr__InternalFindPlayerSquelch;
DetourHandle_t m_hCVoiceStatus__IsPlayerBlocked;
DetourHandle_t m_hCVoiceStatus__SetPlayerBlockedState;
DetourHandle_t m_hCVoiceStatus__UpdateServerState;
DetourHandle_t m_hHACK_GetPlayerUniqueID;
DetourHandle_t m_hUserMsgHook_SayText;
};
extern CMuteManager g_MuteManager;
#endif