Make /me work with custom texts

This commit is contained in:
Daniel Winzen
2016-08-28 18:19:39 +02:00
parent 2d4ba6f902
commit 1ec5a6b562
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Enable image embedding without cookies as there is no more risk of session leaka
Allow configuring password and nickname regex 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
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

@ -2786,7 +2786,7 @@ function validate_input(){
function apply_filter(){ function apply_filter(){
global $I, $U; global $I, $U;
if($U['poststatus']!==9 && preg_match('~^/me~i', $U['message'])){ if($U['poststatus']!==9 && preg_match('~^/me~i', $U['message'])){
$U['displaysend']=substr($U['displaysend'], 0, -3); $U['displaysend']=style_this($U['nickname'], $U['style']);
$U['message']=preg_replace("~^/me~i", '', $U['message']); $U['message']=preg_replace("~^/me~i", '', $U['message']);
} }
$U['message']=preg_replace_callback('/\@([^\s]+)/i', function ($matched){ $U['message']=preg_replace_callback('/\@([^\s]+)/i', function ($matched){