@ -18,6 +18,7 @@
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/db.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/db.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/bann.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/bann.inc.php');
function sendMessage($von, $besitzer, $betreff, $text){
function sendMessage($von, $besitzer, $betreff, $text){
@ -54,20 +55,7 @@ function sendChatMessage($user,$text, $usergroups){
// Nun pruefen, ob der User ein spammer ist
// Nun pruefen, ob der User ein spammer ist
becomeSpammer($user['id'],$user['nickname'],$text);
becomeSpammer($user['id'],$user['nickname'],$text);
// Faerbe den Spieler nur ein wenn Werbung auf Hardcore steht
$nick = displayUserNameByID($user['id']);
if(isUserInGroup($usergroups, Werbung_an)){
if(isUserInGroup($usergroups, admin)){
$nick = '< span style = "color:lime" > '.encodeNoHTMLNoBB($user['nickname']).'< / span > ';
} else if(isUserInGroup($usergroups, entwickler)){
$nick = '< span style = "color:#44BFFF" > '.encodeNoHTMLNoBB($user['nickname']).'< / span > ';
} else if(isUserInGroup($usergroups, designer)){
$nick = '< span style = "color:#F70000" > '.encodeNoHTMLNoBB($user['nickname']).'< / span > ';
} else {
$nick = '< span style = "color:gold" > '.encodeNoHTMLNoBB($user['nickname']).'< / span > ';
}
} else {
$nick = encodeNoHTMLNoBB($user['nickname']);
}
if($text != '' & & !is_null($text)){
if($text != '' & & !is_null($text)){
mysql_query('INSERT ag_chat SET nachricht=\''.$text.'\', user=\''.$nick.'\'');
mysql_query('INSERT ag_chat SET nachricht=\''.$text.'\', user=\''.$nick.'\'');