removed debug output

fixed an antiflood bug posted on the forums

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401940
This commit is contained in:
David Anderson
2008-03-16 22:32:03 +00:00
parent 76f1c10409
commit 2583e7e69e
2 changed files with 11 additions and 6 deletions
+11 -2
View File
@@ -185,12 +185,21 @@ void ChatTriggers::OnSayCommand_Pre()
{
CCommand command;
#endif
int client = g_ConCmds.GetCommandClient();
int client;
CPlayer *pPlayer;
client = g_ConCmds.GetCommandClient();
m_bIsChatTrigger = false;
m_bWasFloodedMessage = false;
/* The server console cannot do this */
if (client == 0)
if (client == 0 || (pPlayer = g_Players.GetPlayerByIndex(client)) == NULL)
{
RETURN_META(MRES_IGNORED);
}
/* We guarantee the client is connected */
if (!pPlayer->IsConnected())
{
RETURN_META(MRES_IGNORED);
}