fixed portion of amb777 -- chat triggers ate up spaces and thus "/ kick" was the same as "/kick"
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401383
This commit is contained in:
parent
0dcd1edd56
commit
2930621b7d
@ -223,18 +223,6 @@ void ChatTriggers::OnSayCommand_Post()
|
||||
|
||||
bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_quoted)
|
||||
{
|
||||
/* Eat up whitespace */
|
||||
while (*args != '\0' && IsWhitespace(args))
|
||||
{
|
||||
args++;
|
||||
}
|
||||
|
||||
/* Check if we're still valid */
|
||||
if (*args == '\0')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Extract a command. This is kind of sloppy. */
|
||||
char cmd_buf[64];
|
||||
size_t cmd_len = 0;
|
||||
@ -248,6 +236,11 @@ bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_
|
||||
}
|
||||
cmd_buf[cmd_len] = '\0';
|
||||
|
||||
if (cmd_len == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* See if we have this registered */
|
||||
bool prepended = false;
|
||||
if (!g_ConCmds.LookForSourceModCommand(cmd_buf))
|
||||
|
Loading…
Reference in New Issue
Block a user