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.
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.
Aliases like /j used to not work when called from the global room while not in
lobby.
Using rest parameters for TestPattern#register instead of a
single array came out to be faster.
/roomtopic also isn't a command.
This now makes it so that if a user can broadcast but cannot declare in that room, and they attempt to broadcast it, it will now send them the error reply themselves instead of broadcasting the error reply to the room.
Credits to Slayer95 for this fix!
/inviteonly is a simplified interface for /modjoin, with only two
options:
- /inviteonly on = /modjoin +
- /inviteonly off = /modjoin off
This should make it clearer exactly what modjoin is used for.
There's also a new shortcut command:
- /ioo = /inviteonly on
which should be useful to players who frequently need maximum security.
Modjoin also no longer triggers modchat, if you use modjoin settings
other than sync.
These changes were supposed to be in de524c1a26 but got lost in my
Git stash...
Once again, this is very experimental code; please don't base any
serious changes on it.
- /ip would display "undefined" for rooms a user isn't banned/muted in
- CrisisMonitor would report private roombans/blacklists
- Roombans/blacklists would alert for rooms you're not in
- There were crashes in /mute and /hidetext
Roombans/blacklists have been mostly rewritten from scratch.
The new code mostly uses the same patterns as global punishments.
In addition:
- /ban has been renamed /globalban
- globalbans and blacklists now require a reason
- bans and blacklists in public rooms now show up in global modlog
- blacklist syntax is different: /blacklist and /unblacklist
- ban/blacklist display in /whoare is now more detailed
This isn't all the work that needs to be done on blacklists, but it's
the highest-priority changes.
- blacklists.tsv has been renamed room-punishments.tsv
- The format everywhere has changed to roomid:userid, rather than
roomid|userid
- roompunishments.tsv's format is now `Room ID:User ID, IPs and alts`
rather than `User ID, Room ID|IPs and alts`, which is more sane and
also cuts down on repetition of room IDs
Those are the changes that affect storage format, which are highest
priority because I don't want to support the previous format.
Other changes include:
- Punishments.roombannedIps renamed to Punishments.roomIps
- Punishments.roombannedUserids renamed to Punishments.roomUserids
- Some refactoring for ES6 destructuring
- Various bugfixes
Room setting commands, including /modchat and also /capsfilter, are now
set in chat-plugins/roomsettings.js.
/capitals has been renamed /capsfilter
/stretching has been renamed /stretchfilter
The /roomsettings UI has been redesigned.
Before, an options object containing properties and values to be used
was how decorated instances of the class would be created. This meant
the constructor could assign anything you feel like to `this`. Rather
than that, the constructor now assigns a strict set of values, and
methods are redefined in subclasses.
Basic unit tests were added to test if they could be written for after
the final refactor to fix the other memory leak here.
Before, if a user was perma locked or perma banned, it would show that their lock would expire in a negative time - this fixes that.
For consistency, I also added the check to the namelock check as well.
They cause too many false positives to be useful currently. I might re-implement them in a different way to avoid this, but the room staff has let me know this is a very low priority
This commit introduces Tools.html and Tools.plural, helper functions
for string construction.
Tools.html is a template tag function that escapes HTML inside the
template string.
Tools.plural is a helper function that takes a passed Number, Array,
Set, or Map and returns a string representing whether or not it's
plural.
It also starts doing some refactors of some files to make it clear how
I expect code style for template strings to look.
Previously, we used ' for IDs, " for English text, and ' for code.
We should now be using ' for IDs, ` for English text, and ` for code.