feat: cleanup chat commands
authorxangelo <me@xangelo.ca>
Thu, 7 Sep 2023 17:56:29 +0000 (13:56 -0400)
committerxangelo <me@xangelo.ca>
Thu, 7 Sep 2023 17:56:29 +0000 (13:56 -0400)
commit074d6ad45d7afae4b03f07a92f6e173e4083a1c8
treee9bdef6a446b87b15628d54135623fe95d6627df
parentb6aa622117f337bb182c4fa7e1818ac94191ae75
feat: cleanup chat commands

It's now easy to add chat commands independently without touching the
main server code. You get
- raw string without the `/server` prefix
- Socket.io Server
- Socket.io Socket
- Calling Player

Adn you are free to do whatever you need. All existing commands have
been moved to this format.
src/server/api.ts
src/server/chat-commands.ts
src/server/chat-commands/base.ts [new file with mode: 0644]
src/server/chat-commands/index.ts [new file with mode: 0644]
src/server/chat-commands/refresh-cities.ts [new file with mode: 0644]
src/server/chat-commands/refresh-monsters.ts [new file with mode: 0644]
src/server/chat-commands/refresh-shops.ts [new file with mode: 0644]
src/server/chat-commands/say.ts [new file with mode: 0644]
src/server/chat-commands/set-level.ts [new file with mode: 0644]
src/server/player.ts
src/shared/player.ts