Nothing particularly consequential, just some changes that make it
play better with type checkers.
(I've been toying with flodoc but unfortunately it's not at a point
where it works particularly well...)
CommandParser.parse has been refactored so most of its logic now
resides in CommandContext#parse.
CommandParser recursion is now a lot lighter. Instead of make a new
copy of the CommandContext, the existing one is reused.
messages.js no longer needs to exist; its functionality is now in
CommandContext#parse and CommandContext#canTalk. Its duplicate code
is gone now! :D
The inNamespace option of CommandContext#parse appears unused and has
been removed.
Users#matchesRank has been renamed Users#authAtLeast.
The old /updateserver used the equivalent of
git pull --rebase
(if that fails)
git stash && git pull --rebase && git stash pop
The new /updateserver works on
git fetch && git rebase --autostash FETCH_HEAD
Which is a lot simpler and should in theory be more resilient to merge
conflicts while stashing.
This is the source of the infamous !om g issue.
The new design looks better, anyway, and allows !formatshelp to also
be braodcast since it's no longer spammy.
!om searching will also now only search OMs.
This unifies modjoin checks (both Room#modjoin and Room#staffRoom join
restrictions) under one function, Room#checkModjoin.
This makes it easier for commands to check whether a user should know
about a room's existence, which, previously, had been duplicated
unreliably in each command's implementation.
Fixes#2426
PMs no longer special-case commands. The implementation of /invite,
/me, etc in commands have been fully moved from messages.js back to
commands.js and the rest. This makes Messages command support a lot
closer to how CommandParser itself handles commands; the two files
should be mergeable soon.
/me has been refactored, and now supports /ME, /me's, etc in PMs and
regular chat exactly the same way.
context.pmTarget is now guaranteed to be `User|undefined`, rather than
its previous specification of `User|string|undefined`. The previous
use-case of putting a string in context.pmTarget was to support
errorReply when PMing a nonexistent user, but special-casing that
case is easier than having to support a possible string pmTarget
everywhere.
The main reason I think this should be added is that a lot of people don't know this command, and so having it in the roomsettings should make it better-known to the relevant users that it's actually a thing.