auto-kick spammers not setting a postid
This commit is contained in:
3
chat.php
3
chat.php
@ -2926,6 +2926,9 @@ function validate_input() : string {
|
||||
$maxmessage=get_setting('maxmessage');
|
||||
$message=mb_substr($_POST['message'], 0, $maxmessage);
|
||||
$rejected=mb_substr($_POST['message'], $maxmessage);
|
||||
if(!isset($_POST['postid'])){ // auto-kick spammers not setting a postid
|
||||
kick_chatter([$U['nickname']], '', false);
|
||||
}
|
||||
if($U['postid']===$_POST['postid']){ // ignore double post=reload from browser or proxy
|
||||
$message='';
|
||||
}elseif((time()-$U['lastpost'])<=1){ // time between posts too short, reject!
|
||||
|
Reference in New Issue
Block a user