Skip to content

Commit d4e9b0b

Browse files
committed
Strip color codes from /tps output
This is what I get for releasing a new version without actually testing! Change-Id: I9db476feb4ec0266bb44ff28b39c9244507a544a
1 parent 69a8344 commit d4e9b0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

minecraft_lag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
echo "tps.value {$tps}\n";
5050
echo "normal.value 20.00\n";
5151
} else {
52-
$data = $data = dataPlz("tps");
52+
$data = dataPlz("tps");
53+
$data = preg_replace('/§./', '', $data);
5354

5455
if (preg_match('/TPS from last 1m, 5m, 15m: ([0-9.]+), ([0-9.]+), ([0-9.]+)/', $data, $matches)) {
5556
$tps = str_replace(',', '', $matches[1]);

0 commit comments

Comments
 (0)