From c7853f86783ce5eac9683068473c0ed98123f39e Mon Sep 17 00:00:00 2001 From: hecht Date: Sun, 11 Sep 2011 11:23:30 +0000 Subject: [PATCH] fix: anonymous chatter names were not displayed --- ag/include/messagefunctions.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ag/include/messagefunctions.inc.php b/ag/include/messagefunctions.inc.php index fec141e..ac568cb 100644 --- a/ag/include/messagefunctions.inc.php +++ b/ag/include/messagefunctions.inc.php @@ -55,8 +55,11 @@ function sendChatMessage($user,$text, $usergroups){ // Nun pruefen, ob der User ein spammer ist becomeSpammer($user['id'],$user['nickname'],$text); - $nick = displayUserNameByID($user['id']); - + if(strpos($user['nickname'], 'anon_') === 0) { + $nick = $user['nickname']; + } else { + $nick = displayUserNameByID($user['id']); + } if($text != '' && !is_null($text)){ mysql_query('INSERT ag_chat SET nachricht=\''.$text.'\', user=\''.$nick.'\''); } @@ -133,4 +136,4 @@ function sendInviteToClanMessage($leaderid, $userid) { } -?> \ No newline at end of file +?>