fixed spam

This commit is contained in:
Dylan K. Taylor 2021-11-22 15:37:33 +00:00
parent cbe0f44c4f
commit d3878b2d57
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -116,6 +116,9 @@ final class ConsoleReaderThread extends Thread{
$command = preg_replace("#\\x1b\\x5b([^\\x1b]*\\x7e|[\\x40-\\x50])#", "", trim($command)) ?? throw new AssumptionFailedError("This regex is assumed to be valid");
$command = preg_replace('/[[:cntrl:]]/', '', $command) ?? throw new AssumptionFailedError("This regex is assumed to be valid");
if($command === ""){
continue;
}
$buffer[] = $command;
if($notifier !== null){
$notifier->wakeupSleeper();