Skip to content

Commit b273545

Browse files
committed
fix: fix command parse
1 parent 9d802cd commit b273545

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/EventAPI.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,9 @@ void InitBasicEventListeners() {
13651365
bus.emplaceListener<ExecutingCommandEvent>([](ExecutingCommandEvent& ev) {
13661366
if (ev.commandContext().getCommandOrigin().getOriginType() == CommandOriginType::DedicatedServer) {
13671367
std::string cmd = ev.commandContext().mCommand;
1368-
cmd.erase(0, 1);
1368+
if (cmd.starts_with("/")) {
1369+
cmd.erase(0, 1);
1370+
}
13691371

13701372
if (!ProcessDebugEngine(cmd)) {
13711373
ev.cancel();

0 commit comments

Comments
 (0)