From 18d595413838454665bd355335d9d89e0bb8170b Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Tue, 20 Sep 2016 18:48:54 +0200 Subject: [PATCH] Make @mention work at the end of a line in multi-line mode. --- chat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat.php b/chat.php index ed89c2e..386f3c7 100644 --- a/chat.php +++ b/chat.php @@ -2896,6 +2896,7 @@ function apply_filter(){ $U['displaysend']=style_this(htmlspecialchars($U['nickname']), $U['style']); $U['message']=preg_replace("~^/me~i", '', $U['message']); } + $U['message']=str_replace('
', "\n", $U['message']); $U['message']=preg_replace_callback('/\@([^\s]+)/i', function ($matched){ global $db; $nick=$matched[1]; @@ -2933,7 +2934,6 @@ function apply_filter(){ } return "$matched[0]"; }, $U['message']); - $U['message']=str_replace('
', "\n", $U['message']); $filters=get_filters(); foreach($filters as $filter){ if($U['poststatus']!==9 || !$filter['allowinpm']){