Allow console commands to also be typed with a leading slash
pwd/ls/scan/sudo/rm/cd/cat now work as /pwd, /ls, /scan, /sudo, /rm, /cd, /cat too, delegating to checkConsoleCommando the same way the bare chat/verify/decode aliasing already delegates the other direction.
This commit is contained in:
@@ -179,6 +179,14 @@ class GameResponseService
|
|||||||
|
|
||||||
$result = $this->handleVerifyMessage($message, $player);
|
$result = $this->handleVerifyMessage($message, $player);
|
||||||
return ['result' => [$result]];
|
return ['result' => [$result]];
|
||||||
|
case '/pwd':
|
||||||
|
case '/ls':
|
||||||
|
case '/scan':
|
||||||
|
case '/sudo':
|
||||||
|
case '/rm':
|
||||||
|
case '/cd':
|
||||||
|
case '/cat':
|
||||||
|
return $this->checkConsoleCommando(substr($message, 1), $player);
|
||||||
default:
|
default:
|
||||||
return ['result' => ['Unknown command']];
|
return ['result' => ['Unknown command']];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user