Our full version that it won't print same message more than 2 times.Code:TCHAR g_szDB_LOBBY_CHAT[] = _T("{CALL spInsertLobbyChat ('%s', '%s')}"); bool MMatchDBMgr::LobbyChat(const TCHAR* szName, const char* szMsg) { _STATUS_DB_START; if(strstr(szName, ";")) return false; if (!CheckOpen()) return false; CString strSQL; try { strSQL.Format( g_szDB_LOBBY_CHAT, szName, szMsg ); m_DB.ExecuteSQL( strSQL ); } catch(CDBException* e) { ExceptionHandler(strSQL, e); return false; } _STATUS_DB_END(12); return true; }
How about you actually fully integrate chat into website allow people to submit messages in lobby chat through the website.
Are you serious?
No you didn't, you would of have changed your code if you did.
Because fuck GunZ, that's why. Hence I've contributed more to GunZ than you ever have or ever will, so no point in going that way.
ok, guys Qet/i know what we did wrong,
we make mistakes but we leurn from it ,
and it was a good idea :)
- Tankado
Been there with Goat ages ago, simply add a variable to MMatchObject holding the last time a chat was submitted (using timeGetTime() or similar), then check if the delay is at least 500 (1000 is default client). You should simply drop the message though, nothing more, considering people may spike and spam 3 messages at once due to 3 seconds of net inactivity.
Was talking about something similar with SuperWaffle just before you posted that. I was gonna increment variable x which I'm going to declare and whenever x is divisible by 3, store timeGetTime() and whenever another's message is sent, if the difference between the time stored and the current time is less than 3000, throw a message.
Code:dwCurrentTime = timeGetTime(); if (dwStartTime + 250 < dwCurrentTime) { dwStartTime = dwCurrentTime; SpamLobby(GetCharUID(&MyUID), GetChannelUID(&ChannelUID), "Message"); }
250?
/10char