added reply-to stuff for the C++ API
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401525
This commit is contained in:
parent
5600942b3c
commit
c420f453de
@ -33,6 +33,7 @@
|
|||||||
#include "ChatTriggers.h"
|
#include "ChatTriggers.h"
|
||||||
#include "sm_stringutil.h"
|
#include "sm_stringutil.h"
|
||||||
#include "ConCmdManager.h"
|
#include "ConCmdManager.h"
|
||||||
|
#include <IPlayerHelpers.h>
|
||||||
|
|
||||||
/* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does */
|
/* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does */
|
||||||
extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
|
extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0<void>);
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
|
|
||||||
#include "sm_globals.h"
|
#include "sm_globals.h"
|
||||||
#include "sourcemm_api.h"
|
#include "sourcemm_api.h"
|
||||||
|
#include <IGameHelpers.h>
|
||||||
#define SM_REPLY_CONSOLE 0
|
|
||||||
#define SM_REPLY_CHAT 1
|
|
||||||
|
|
||||||
class ChatTriggers : public SMGlobalClass
|
class ChatTriggers : public SMGlobalClass
|
||||||
{
|
{
|
||||||
|
@ -382,4 +382,3 @@ bool CHalfLife2::IsLANServer()
|
|||||||
|
|
||||||
return (sv_lan->GetInt() != 0);
|
return (sv_lan->GetInt() != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "TimerSys.h"
|
#include "TimerSys.h"
|
||||||
#include "Translator.h"
|
#include "Translator.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
#include "ChatTriggers.h"
|
||||||
|
|
||||||
PlayerManager g_Players;
|
PlayerManager g_Players;
|
||||||
bool g_OnMapStarted = false;
|
bool g_OnMapStarted = false;
|
||||||
@ -791,6 +792,16 @@ void PlayerManager::RecheckAnyAdmins()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int PlayerManager::GetReplyTo()
|
||||||
|
{
|
||||||
|
return g_ChatTriggers.GetReplyTo();
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int PlayerManager::SetReplyTo(unsigned int reply)
|
||||||
|
{
|
||||||
|
return g_ChatTriggers.SetReplyTo(reply);
|
||||||
|
}
|
||||||
|
|
||||||
/*******************
|
/*******************
|
||||||
*** PLAYER CODE ***
|
*** PLAYER CODE ***
|
||||||
*******************/
|
*******************/
|
||||||
|
@ -147,6 +147,8 @@ public:
|
|||||||
bool CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id);
|
bool CheckSetAdminName(int index, CPlayer *pPlayer, AdminId id);
|
||||||
const char *GetPassInfoVar();
|
const char *GetPassInfoVar();
|
||||||
void RecheckAnyAdmins();
|
void RecheckAnyAdmins();
|
||||||
|
unsigned int GetReplyTo();
|
||||||
|
unsigned int SetReplyTo(unsigned int reply);
|
||||||
private:
|
private:
|
||||||
void OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
|
void OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
|
||||||
private:
|
private:
|
||||||
|
@ -41,11 +41,14 @@
|
|||||||
#include <IAdminSystem.h>
|
#include <IAdminSystem.h>
|
||||||
|
|
||||||
#define SMINTERFACE_PLAYERMANAGER_NAME "IPlayerManager"
|
#define SMINTERFACE_PLAYERMANAGER_NAME "IPlayerManager"
|
||||||
#define SMINTERFACE_PLAYERMANAGER_VERSION 5
|
#define SMINTERFACE_PLAYERMANAGER_VERSION 6
|
||||||
|
|
||||||
struct edict_t;
|
struct edict_t;
|
||||||
class IPlayerInfo;
|
class IPlayerInfo;
|
||||||
|
|
||||||
|
#define SM_REPLY_CONSOLE 0 /**< Reply to console. */
|
||||||
|
#define SM_REPLY_CHAT 1 /**< Reply to chat. */
|
||||||
|
|
||||||
namespace SourceMod
|
namespace SourceMod
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -305,6 +308,21 @@ namespace SourceMod
|
|||||||
* at least once, false otherwise.
|
* at least once, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsServerActivated() =0;
|
virtual bool IsServerActivated() =0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets SourceMod's reply source.
|
||||||
|
*
|
||||||
|
* @return ReplyTo source.
|
||||||
|
*/
|
||||||
|
virtual unsigned int GetReplyTo() =0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets SourceMod's reply source.
|
||||||
|
*
|
||||||
|
* @param reply Reply source.
|
||||||
|
* @return Old reply source.
|
||||||
|
*/
|
||||||
|
virtual unsigned int SetReplyTo(unsigned int reply) =0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user