Skip to content

Instantly share code, notes, and snippets.

@rumblefrog
Last active January 27, 2018 04:47
Show Gist options
  • Save rumblefrog/b05911c07936d451dab8bbf9adfbe6b3 to your computer and use it in GitHub Desktop.
Save rumblefrog/b05911c07936d451dab8bbf9adfbe6b3 to your computer and use it in GitHub Desktop.
Sourcebans++ Blacklist Coloring Visual Only

Usage

To use this patch, simply insert & replace accordingly, when patched you may include the word blacklist anywhere in the reason for it to activate.

/* Insert anywhere in css.php */
td.listtable_1_blacklist {
font-family: Verdana, Arial, Tahoma, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
font-size: 10px;
color: #fff;
padding-top: 4px;
padding-right: 4px;
padding-bottom: 4px;
padding-left: 4px;
background-color: #000;
}
// Replace line 510
$data['class'] = (stripos($res->fields['ban_reason'], 'blacklist') !== false) ? 'listtable_1_blacklist' : 'listtable_1_permanent';
// Replace line 684
$data['banlength'] = ($data['class'] == 'listtable_1_blacklist') ? 'Blacklisted' : $data['ban_length'] . " " . $data['ub_reason'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment