- 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.
Context in command-parser.js has been renamed CommandContext and
refactored to use ES6 classes. Its also subsumed the canTalk
function. Future iterations will probably put the parse function
inside it as well.
Now that nodejs/node#3072 is mostly fixed, we can finally start using
Node 4+ features.
This refactor:
- uses arrow functions where appropriate
Note that arrow functions still aren't used in Mocha, where `this`
is sometimes meaningful.
This also removes the need for .bind() nearly everywhere, as well
as the `self = this` trick.
- refactors Validator and Connection into ES6 classes
- no longer uses Array#forEach for iterating arrays
We strongly prefer for (let i = 0; i < arr.length; i++) because of
performance reasons. Most forEaches have been replaced with for..of,
though, which is 5x slower than the long-form loop but 2x faster
than forEach, which is good enough outside of most inner loops.
The only exception is tournaments, which is due for a more invasive
refactor soon anyway.
Crashlogger now supports passing in a dictionary of additional
information to report, so we no longer need to resort to making fake
errors.
The hadException parameter has now been removed entirely. I don't know
of a use case for it to be false.
Most images are hosted in places that already support HTTPS, so all
we need to do is transparently rewrite them to be protocol-local.
For the rest, I don't care enough to enforce HTTPS on them. At
least wait for browsers to complain more about it...
If a room is under modjoin, /invite will try to roomvoice a user who
doesn't already have permission to join the room.
This feature is pretty rudimentary and only works if the modjoin
setting is `+`, but I'm 80% sure it's better than nothing.
Fixes the long-standing issue of bad interaction between `this.parse('!command')` and `this.canBroadcast()`: each time the latter was called, it would announce the command usage.