Open f0ffee opened 3 years ago
Errors like this are sent with an |error|
protocol message (|error|You cannot have a tournament until the current room activity is over: [Gen 3] Random Battle tournament
).
These are the search results for |error|
on the ps server code:
/server/chat-plugins/mafia.ts
)/server/ladders-remote.ts
)/server/room-battle.ts
)/server/tournaments/index.ts
, but those are all |tournament|error|...
/server/monitor.ts
there's one, but i think it's only used for debug messages/sim/side.ts
has an utility function which sends a |error|
message with a string passed to it, but prefixed with [Unavailable/Invalid choice]
(it's only used for invalid battle choices)/server/chat.ts
has another utility function, that's called like 3000 timesSo, if we pass every |error| message we receive directly into the chatroom we solve this and similar problems, but we risk sending some (many?) messages we should probably not send. We can't really whitelist some specific messages (like You cannot have a tournament until the current room activity is over...
), because sometimes they are translated
Yeah this is something I wanted to address when we have a structure that supports parsing messages that are received shortly after a cerbottana command has been executed, to reduce false positives.
Sometimes, when trying to create a tour with a bot command, nothing will happen.
It would be nice if there was some output explaining why the tour can't be created, for example because the server is restarting soon, or because there's another game in progress in the room.