Backed out changeset fa286305bd3f

This commit is contained in:
David Anderson 2009-02-25 20:07:12 -05:00
parent c968dfa113
commit 3623ee3ce8
3 changed files with 1 additions and 27 deletions

View File

@ -47,13 +47,6 @@
*/ */
"SilentChatTrigger" "/" "SilentChatTrigger" "/"
/**
* Optional, second string to use as the silent chat trigger. Set an empty
* string to disable. This is can be useful on games that steal the primary
* choice (such as TF2 and "/")
*/
"SilentChatTrigger2" "."
/** /**
* If a say command is a silent chat trigger, and is used by an admin, * If a say command is a silent chat trigger, and is used by an admin,
* but it does not evaluate to an actual command, it will be displayed * but it does not evaluate to an actual command, it will be displayed

View File

@ -63,10 +63,8 @@ ChatTriggers::ChatTriggers() : m_pSayCmd(NULL), m_bWillProcessInPost(false),
{ {
m_PubTrigger = sm_strdup("!"); m_PubTrigger = sm_strdup("!");
m_PrivTrigger = sm_strdup("/"); m_PrivTrigger = sm_strdup("/");
m_PrivTrigger2 = sm_strdup(".");
m_PubTriggerSize = 1; m_PubTriggerSize = 1;
m_PrivTriggerSize = 1; m_PrivTriggerSize = 1;
m_PrivTriggerSize2 = 1;
m_bIsChatTrigger = false; m_bIsChatTrigger = false;
} }
@ -76,8 +74,6 @@ ChatTriggers::~ChatTriggers()
m_PubTrigger = NULL; m_PubTrigger = NULL;
delete [] m_PrivTrigger; delete [] m_PrivTrigger;
m_PrivTrigger = NULL; m_PrivTrigger = NULL;
delete [] m_PrivTrigger2;
m_PrivTrigger2 = NULL;
} }
ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key, ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key,
@ -100,13 +96,6 @@ ConfigResult ChatTriggers::OnSourceModConfigChanged(const char *key,
m_PrivTriggerSize = strlen(m_PrivTrigger); m_PrivTriggerSize = strlen(m_PrivTrigger);
return ConfigResult_Accept; return ConfigResult_Accept;
} }
else if (strcmp(key, "SilentChatTrigger2") == 0)
{
delete [] m_PrivTrigger2;
m_PrivTrigger2 = sm_strdup(value);
m_PrivTriggerSize2 = strlen(m_PrivTrigger2);
return ConfigResult_Accept;
}
else if (strcmp(key, "SilentFailSuppress") == 0) else if (strcmp(key, "SilentFailSuppress") == 0)
{ {
g_bSupressSilentFails = strcmp(value, "yes") == 0; g_bSupressSilentFails = strcmp(value, "yes") == 0;
@ -269,12 +258,6 @@ void ChatTriggers::OnSayCommand_Pre()
is_silent = true; is_silent = true;
args = &args[m_PrivTriggerSize]; args = &args[m_PrivTriggerSize];
} }
else if (m_PrivTriggerSize2 && strncmp(args, m_PrivTrigger2, m_PrivTriggerSize2) == 0)
{
is_trigger = true;
is_silent = true;
args = &args[m_PrivTriggerSize2];
}
if (!is_trigger) if (!is_trigger)
{ {

View File

@ -75,9 +75,7 @@ private:
char *m_PubTrigger; char *m_PubTrigger;
size_t m_PubTriggerSize; size_t m_PubTriggerSize;
char *m_PrivTrigger; char *m_PrivTrigger;
char *m_PrivTrigger2;
size_t m_PrivTriggerSize; size_t m_PrivTriggerSize;
size_t m_PrivTriggerSize2;
bool m_bWillProcessInPost; bool m_bWillProcessInPost;
bool m_bTriggerWasSilent; bool m_bTriggerWasSilent;
bool m_bIsChatTrigger; bool m_bIsChatTrigger;