Set replace of a filter used for kicking as kickmessage

This commit is contained in:
Daniel Winzen
2016-08-28 21:04:38 +02:00
parent 1ec5a6b562
commit f8abff926b
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ Allow configuring password and nickname regex
Prevent browser from caching at all. Prevent browser from caching at all.
Add external CSS setting for large stylesheets Add external CSS setting for large stylesheets
Make /me work with custom texts Make /me work with custom texts
Set replace of a filter used for kicking as kickmessage
Version 1.20.6 - Jul. 23, 2016 Version 1.20.6 - Jul. 23, 2016
Simplify ignore logic + disallow ignoring chatters with higher status Simplify ignore logic + disallow ignoring chatters with higher status

View File

@ -2827,9 +2827,9 @@ function apply_filter(){
$U['message']=preg_replace("/$filter[match]/i", $filter['replace'], $U['message'], -1, $count); $U['message']=preg_replace("/$filter[match]/i", $filter['replace'], $U['message'], -1, $count);
} }
if(isSet($count) && $count>0 && $filter['kick']){ if(isSet($count) && $count>0 && $filter['kick']){
kick_chatter(array($U['nickname']), '', false); kick_chatter(array($U['nickname']), $filter['replace'], false);
setcookie(COOKIENAME, false); setcookie(COOKIENAME, false);
send_error("$I[kicked]"); send_error("$I[kicked]<br>$filter[replace]");
} }
} }
$U['message']=str_replace("\n", '<br>', $U['message']); $U['message']=str_replace("\n", '<br>', $U['message']);