moose-team / friends

:tv: P2P chat powered by the web.
http://moose-team.github.io/friends/
MIT License
3.17k stars 341 forks source link

Externalize "/" commands #117

Closed misspokeycat closed 9 years ago

misspokeycat commented 9 years ago

It would be excellent if instead of having a big switch in the middle of app.js we could have a commands.js file that contains all the commands in their own objects. Command objects should have the function they will run, a description of what they do (to be later used in /help, and preferably a list of built-in aliases for each command.

bcomnes commented 9 years ago

It doesn't cover everything here, but we can at least get all of this out of app.js: https://github.com/moose-team/friends/pull/118

misspokeycat commented 9 years ago

It seems good enough for now. I'll make /help a separate issue.