mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 00:42:43 +00:00
Add banner display name support
This commit is contained in:
parent
74b0030ef2
commit
b6459b3a38
@ -26,10 +26,7 @@ function get_avatar($name) {
|
||||
}
|
||||
|
||||
function get_banner_name($banner) {
|
||||
if ($banner === "CONSOLE") {
|
||||
return "Console";
|
||||
}
|
||||
return $banner;
|
||||
return clean($banner);
|
||||
}
|
||||
|
||||
function millis_to_date($millis) {
|
||||
@ -38,8 +35,10 @@ function millis_to_date($millis) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares text to be displayed as a ban reason.
|
||||
* Prepares text to be displayed on the web interface.
|
||||
* Removes chat colours, replaces newlines with proper HTML, and sanitizes the text.
|
||||
* @param $text
|
||||
* @return mixed|string
|
||||
*/
|
||||
function clean($text) {
|
||||
if (strstr($text, "\xa7") || strstr($text, "&")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user