Commit Graph

14 Commits

Author SHA1 Message Date
Guangcong Luo
d6f5404e7e Rename CommandParser to Chat
We had a lot of discussion in Dev and a somewhat-close poll, but in
the end "Chat" was a better name than "Messages", and also has the
advantage of being shorter (which is nice for Chat.html and
Chat.plural which should be short).
2016-09-30 18:31:15 -07:00
Guangcong Luo
da1b318707 Move text processing from Tools to CommandParser
The following functions have been renamed:

- Tools.html to CommandParser.html
- Tools.plural to CommandParser.plural
- Tools.escapeHTML to CommandParser.escapeHTML
- Tools.toDurationString to CommandParser.toDurationString
- Tools.toTimeStamp to CommandParser.toTimestamp
  (notice the lowercase 's')

This is in preparation for a rename of Tools to Dex (by removing the
non-dex-related functions) and a rename of CommandParser to either
Messages or Chat.
2016-09-30 18:04:13 -07:00
Bär Halberkamp
de7547a719 TCG: Add /ptcg to search bulbapedia 2016-09-02 23:30:11 +02:00
Bär Halberkamp
df8687e513 TCG: Actually fix /ygo 2016-09-01 03:19:44 +02:00
Bär Halberkamp
542c1e2a7a TCG: fix mistakes in 3123e35 2016-09-01 02:51:36 +02:00
Bär Halberkamp
3123e35799 TCG: Add image previews of searched cards 2016-09-01 00:52:49 +02:00
Ivo Julca
22779102cc Lint: Add miscellaneous extra rules
Among the newly added rules, there are quite a few intended to enforce
compliance of CONTRIBUTING.md-blessed idioms, as well as ensure
safe usage of classes and constant bindings.

We are also now enforcing usage of early return in commands.js,
which has 100% compliance as of fd2c45c.
2016-04-25 21:52:21 -05:00
Ivo Julca
10bb83bf3c Improvements to command broadcast API
- Method `this.runBroadcast()` has been split from `this.canBroadcast()`.
It's now the only method handling command-usage and intended as the main API
for synchronous commands. Async commands will execute both separately.
Note that the `suppressMessage` parameter is now passed to `runBroadcast`.

- The semantics of `broadcasting` have been similarly split.
`this,broadcastMessage` will be set to a truthy value when `this.canBroadcast` is run.
`this,broadcasting` will only be set to `true` once `this.runBroadcast` is executed.
2016-04-02 15:46:13 -05:00
Bär Halberkamp
c03df4db8d ygo: move the broadcast check to the callback function 2016-03-29 04:33:38 +02:00
Bär Halberkamp
e3e89bb3bd ygo: Better messages when query cannot be found 2016-03-26 16:40:14 +01:00
Ivo Julca
a8b76becdb TCG TableTop: Minor refactor to take advantage of arrow functions 2016-03-22 21:37:35 -05:00
Bär Halberkamp
4ca5c1d2c8 Remove /mtg and allow /ygo in all rooms
The only wiki we could use sucks, and I'd rather only have a good command usable everywhere
2016-03-16 02:10:23 +01:00
Ivo Julca
12e9ca78da Remove usage of Date|Function methods implemented by Sugar.js
Implements Tools#toTimeStamp to support Node.js builds without ICU support,
which are currently the default. If/when that changes, we should be able to
use Date#toLocaleDateString, given that appropriate locale options are used.
2016-03-09 16:55:47 -05:00
Bär Halberkamp
55b63a9e35 Rename the TG room for the YGO plugin 2016-03-02 06:03:33 +01:00