* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
function isSpammer($id){
$result = mysql_fetch_assoc(mysql_query('SELECT TIMESTAMPDIFF(Second,max(bann_until),now()) as anzahl from spammer WHERE userid='.$id.' group by userid'));
// Man schreibt min 10 posts innerhalb von 20 Sekunden
$result1 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 20'));
// Man schreibt min 30 Posts innerhalb einer Minute
$result2 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' and TIMESTAMPDIFF(Second,zeit,now()) <= 60'));
// Innerhalb einer halben Minute 4 mal den selben Post!!
$result3 = mysql_num_rows(mysql_query('SELECT * FROM ag_chat WHERE user=\''.$nick.'\' AND TIMESTAMPDIFF(Second,zeit,now()) <= 30 AND nachricht = \''.$text.'\''));