Commit Graph

625 Commits

Author SHA1 Message Date
panpawn
9accadc3f9 Roomsettings: Make tour settings consistent (#2788)
b9e33af1c0 (diff-97371680ff383ff965897845c2fb6bf3R113) didn't update all cases of the tour settings
2016-09-27 20:41:18 +04:00
The Immortal
b9e33af1c0 Roomsettings: Update Tournament settings
- Fix the setting: it showed driver instead of mod
- Use auth symbols to be consistent with modchat and modjoin settings
2016-09-27 19:57:42 +04:00
Guangcong Luo
3763ef80ea Make !om search less spammy
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.
2016-09-26 17:25:53 -04:00
Quinton Lee
3822e0c96a Update guide links in /roomhelp 2016-09-26 15:44:20 -05:00
Lord-Haji
2ce71c5e19 Polls: add "button" class to the button (#2652) 2016-09-26 13:38:16 -07:00
Guangcong Luo
ed08b145fc Update roomhelp permissions
Can now only be broadcast by ROs, leaders, and admins

Closes #2784
2016-09-25 23:47:00 -04:00
panpawn
376dcce76d Roomsettings: Use button class for tour setting (#2783)
This update timing kind of got messed up with the timing of using button class buttons in roomsettings.
2016-09-25 20:40:51 -07:00
Guangcong Luo
3c5525c8b0 Fix more crashes in PM refactor 2016-09-25 16:22:28 -04:00
Guangcong Luo
5a16c884da Fix a variety of bugs in PM commands
Most of these were introduced in the PM refactor, but an honorable
mention goes to the global command regex.
2016-09-25 14:12:43 -04:00
Guangcong Luo
1427871a09 Refactor Messages
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.
2016-09-24 23:14:16 -07:00
Guangcong Luo
398dcf93ad Update /roomhelp
Replace /modchat with /roomsettings, and rephrase Tours link, and bold
some headers.

Closes #2764

Closes #2640
2016-09-24 23:14:16 -07:00
Guangcong Luo
5a4a2ec85f Clarify tours setting in /roomsettings 2016-09-24 23:14:16 -07:00
panpawn
5a6fc4b33d Roomsettings: Add enabling/disabling tournaments (#2765)
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.
2016-09-24 15:20:27 -07:00
Bär Halberkamp
8c9abad529 Mafia: fix a stupid typo 2016-09-24 22:50:19 +02:00
Bär Halberkamp
c6814a384d Properly support custom room punishments 2016-09-24 22:49:51 +02:00
panpawn
2c931569cd Fix typo in /slowchat (#2779)
When this was converted to use template strings, this happened
2016-09-24 12:36:24 -07:00
panpawn
30050d6c91 Roomsettings: Use 'button' class in UI (#2767) 2016-09-24 12:34:50 -07:00
Ben Davies
a88825e55f CommandParser: register global command aliases, optimize TestPattern registration (#2777)
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.
2016-09-23 19:50:56 -05:00
panpawn
eaadd1fd44 Fix broken permission with /htmlbox (#2766)
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!
2016-09-22 20:56:07 -07:00
czn-PS
585d7422fd /htmlboxhelp: Update requirements (#2759) 2016-09-20 09:02:04 -07:00
Ivo Julca
ce9cdecafd Drop commands sent to rooms from outside 2016-09-17 19:42:15 -05:00
Bär Halberkamp
0e13baa9ab Wifi: Make giveaway bans persist 2016-09-17 21:31:41 +02:00
The Immortal
67d15f69f8 Scavengers: Allow mods to check uptime and finished users 2016-09-17 20:46:44 +04:00
Guangcong Luo
fc5dc319c1 Better feedback for /inviteonly
It once again displays a big red message, but this time, the big red
message is clearer.
2016-09-17 02:13:24 -07:00
Guangcong Luo
affa4c48f4 Introduce /inviteonly
/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.
2016-09-17 01:42:39 -07:00
Guangcong Luo
ad7301f838 Allow /modjoin + in battles 2016-09-17 04:29:45 -04:00
Guangcong Luo
6b4eaf9422 REALLY support commands in PMs
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.
2016-09-17 01:16:56 -07:00
Guangcong Luo
8367425694 Fix bugs in roomban/blacklist refactor
- /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
2016-09-16 20:20:32 -07:00
Guangcong Luo
05ae323fcd Refactor roombans/blacklists
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
2016-09-16 10:27:26 -07:00
Guangcong Luo
7a7b46bc1e High priority blacklists fixes
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
2016-09-15 06:10:54 -07:00
Guangcong Luo
51db68fba5 Move banword to roomsettings 2016-09-15 06:10:54 -07:00
Bär Halberkamp
28c0a2a22c Rewrite roombans to be timed as well (#2545)
Also implement blacklists
2016-09-15 04:35:00 -07:00
panpawn
0151a7355a Roomsettings: Standardize 'off' in UI (#2743)
I believe these few instances were left out from 505d68923b
2016-09-13 16:34:57 +02:00
Guangcong Luo
e420ed88a2 Polls: Improve separator detection 2016-09-12 16:14:32 -05:00
Guangcong Luo
505d68923b Refactor/redesign roomsettings
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.
2016-09-10 05:54:24 -05:00
Ben Davies
d9c6fe54b2 ProcessManager: subclass to extend ProcessManager, unit tests setup (#2739)
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.
2016-09-09 15:51:49 -05:00
panpawn
6107b2b574 Whois: Don't display negative expire times (#2741)
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.
2016-09-08 21:24:05 -05:00
Ben Davies
4e9577a7e5 Trivia: modlog kicks and wins, clean up unit tests (#2740)
Unit tests were still not destroying a few users.
2016-09-08 02:37:21 -05:00
Bär Halberkamp
3b2dfc0b1a Wifi: Fix a typo in the winner message for question GAs 2016-09-04 04:02:26 +02: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
Bär Halberkamp
8a9e6c5d9e Wifi: Fix false positives 2016-09-01 00:52:49 +02:00
Bär Halberkamp
90fe6294f5 Wifi: Remove aliases
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
2016-08-30 18:55:17 +02:00
Taylor Everding
1a1f64fe95 Remove .js extension from requires (#2725) 2016-08-30 00:04:40 -05:00
Guangcong Luo
54b672fe4e Start refactoring for template strings
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.
2016-08-28 04:35:43 -05:00
Bär Halberkamp
3b18e5f31a Wifi: Improve the sprite previews for giveaways
It now works with other forms and aliases
2016-08-27 23:28:44 +02:00
Ben Davies
237388e6f8 Trivia: adjust question database command permissions (#2717)
Drivers can no longer accept/reject questions, that now being the
responsibility of mods.
2016-08-27 01:34:32 -05:00
Bär Halberkamp
09ab8a7370 Wifi: improve layout of GAs more 2016-08-26 08:49:23 +02:00