Anonymous ID: 55427e May 28, 2019, 9:49 p.m. No.6614763   🗄️.is 🔗kun   >>4771

>>6614687

Let the filters work for you. Regular expressions are your friend. Tons of regular expression sites these day that help you build them.

 

([Gg][oO]yY?)

[Bb][lL][oO][oO][dD]\s+[Ll][iI][Bb][Ee][lL]

[Zz][Ii][Oo][Nn]

Anonymous ID: 55427e May 28, 2019, 10:06 p.m. No.6614865   🗄️.is 🔗kun

>>6614738

 

when a user types text, sleep using a

setTimeout / clearTimeout combination to delay sending the query to the database every single time. this will help buffer your load to the database. 100-300ms should work;

 

two user statistics can be done from a simple approach, one show the 24 hours like you used to; still useful, but say it was 24 hours, then add another for the last 5 minutes. This is easy if you have a timestamp on the session database; usually I select count() if it is >= time() - 300