Commit Graph

668 Commits

Author SHA1 Message Date
panpawn
da7fbe031b Checkpunishment: Don't use target id in UI (#2863)
This makes it more streamlined to how `/whois` looks
2016-10-29 00:04:20 -05:00
panpawn
157d419c1a Studio: Add Song of the Day functionality (#2848)
Requested by #Don't Lose

This also fixes the check for it a user can talk in the set command to be the same check throughout PS.

This also fixes escaping HTML for the set artist in two specific instances.
2016-10-26 18:57:59 -05:00
panpawn
5f8d655609 chat-plugins/faq.js -> chat-plugins/room-faqs.js (#2859)
'faq.js' is vague and inconsistent to it's actual functionality, that being, specifically for *rooms*
2016-10-26 18:56:44 -05:00
panpawn
2f834d6551 Roomfaqs: Add missing </code> tag in UI (#2858) 2016-10-26 12:31:56 +02:00
Guangcong Luo
22c6342c00 Support offline users in /alts
/alts now delegates to a new command /checkpunishment, if passed an
unknown username. This allows mods to check offline users for active
punishments.
2016-10-23 22:00:49 -04:00
Nixola
a99992c14c Added third type to /weakness (#2851)
* Added third type to /weakness
In case of Trick-or-Treat or Forest's Curse, a pokémon can have three types. I updated the /weakness command to reflect that.

* Fixed Travis' warning and error
2016-10-22 18:36:41 -05:00
051
8d32874c4b Grammar fix in /scavengerstatus (#2850) 2016-10-22 04:00:24 -05:00
Guangcong Luo
2604780ec5 Refactor Tools
Tools will be renamed to Dex soon, which is why the code inside Tools
is calling itself "Dex" now, but right now we're just refactoring its
internal code and not officially renaming it yet.

In the meantime, Tools is now an ES6 Class.

A long-standing bug in learnset loading order (the one
test/chat-plugins/datasearch.js tests for) has finally been fixed, so
Tools.includeMods() is no longer necessary to accurately access modded
data.

Tools.mod has been split into Tools.mod(modid) and
Tools.format(format). The issue of Tools.mod being ambiguous about
whether it's passed a mod or a format hasn't been a _bug_ for a while,
but this is still more readable.

Other renames include:

Tools#isLoaded -> Tools#dataLoaded
Tools.includeMods() -> Tools.includeModData()
Tools.preloadMods() -> Tools.includeMods()
Tools.preloadedMods -> Tools.modsLoaded
Tools.moddedTools -> Tools.dexes

Do not just rename your calls of Tools.includeMods() to
Tools.includeModData(). With the learnset loading bug fixed, there's
no reason to use it unless you need direct access to
Tools.dexes[...].data for some reason (you don't, just use
Tools.mod(...).data)
2016-10-21 13:23:21 -05:00
Guangcong Luo
87c41eb67c Rename simulator.js to room-battle.js
simulator.js doesn't actually contain the simulator, but is really just
an implementation of battles in the RoomGame interface.

Renames:
`Simulator.Battle` -> `Rooms.RoomBattle`
`Simulator.BattlePlayer` -> `Rooms.RoomBattlePlayer`
`Simulator.SimulatorManager` -> `Rooms.SimulatorManager`
`Simulator.SimulatorProcess` -> `Rooms.SimulatorProcess`
`Simulator.create` -> no longer exists, use `new Rooms.RoomBattle(...)`
2016-10-21 13:21:12 -05:00
Guangcong Luo
d84d06a8d2 Add !optionsbutton and !soundsbutton 2016-10-20 21:31:52 -04:00
Quinton Lee
fbce77a521 The Happy Place plugin: change permission to mod+ 2016-10-19 19:53:50 -05:00
panpawn
5912b2b512 Give drivers access to /banword list (#2845)
It doesn't make sense to me that drivers have access to /showbl but not for /banword list
2016-10-18 13:31:24 +02:00
The Immortal
7193860ac1 Analysis: Fix BH links 2016-10-16 05:24:12 +04:00
HoeenCoder
0d867de0d2 Fix incorrect wording in modjoin (#2843) 2016-10-14 23:12:30 -04:00
Bär Halberkamp
62d29ec2d6 Roomfaqs: add previews 2016-10-13 17:57:13 +02:00
Bär Halberkamp
7439278f66 Roomfaqs: Allow other HTML formatting tags 2016-10-13 17:57:13 +02:00
Bär Halberkamp
08d4e622cb Fix mafia votes 2016-10-11 17:55:09 +02:00
Bär Halberkamp
b96b5025b4 Add a basic faq feature for rooms (#2825) 2016-10-11 05:42:02 -07:00
panpawn
8ab309ae74 Add missing linebreak in /opensource (#2833) 2016-10-10 03:21:54 +04:00
panpawn
76285471a0 Fix double errorReply while muted in some cases (#2830)
Due to the recent refactor that changed how `this.canTalk` works, if a user was muted in a room, and then tried to do a command that wasn't allowed to be used if they can't talk, it would send two replies: "You are muted and cannot talk in this room." AND "You cannot do this while unable to talk."

This makes it so that if you're using a command while muted that isn't allowed to be used if you can't talk, it will just use the "You are muted and cannot talk in this room." errorReply.
2016-10-08 20:58:16 -07:00
panpawn
dd8fcf6d7c Roomsettings: Don't use 'true' in UI (#2828)
This makes it more consistent with the rest of the UI, specifically for the respected changes of filtering capitals / stretching.
2016-10-06 21:49:13 -07:00
panpawn
8744e94a2d Tournaments: Allow ROs to allow % and up to run tours (#2826)
This was requested several times, as a lot of rooms have bots to allow drivers to run tournaments for them.

Note: current room settings for tournaments will not change by default; if you had your room set to allow mods and up before, that will still be the case unless you change it; same for if you had tournaments disabled all together.

This changes the command syntax for `/tournament enable` to be: `/tournament enable [%/@]`.  The command syntax for `/tournament disable` has not changed. (disabling a tournament will make it so only # and up can run tournaments.)

This also re-arranges the roomsettings rank order UI for tournaments; it only makes sense that the ranks go in order of power least to greatest (left to right).
2016-10-06 00:49:53 -07:00
panpawn
420e28ce91 Chat: Tell locked users their lock duration (#2823)
This also adds `Punishments#checkLockExpiration` - mostly for this, but also to remove some repetitive code in the whois command as well.
2016-10-04 23:52:19 -07:00
Ben Davies
1446ec6deb Trivia: implement /trivia search command (#2820)
Now users can search for questions/submissions without having to rummage
through the entire list of questions. Trivia data and its writer are exported
once more so edits can be made to it with /eval if necessary.
2016-10-04 20:53:39 -07:00
Ben Davies
54d0ff203a Performance: replace direct references to arguments with rest parametres (#2818)
Replacing direct references to the arguments object of functions with rest
parametres prevents the function from being deoptimized while still allowing
use of arbitrary arguments. This may also fix some minor memory leaks related
to mishandling the arguments object.
2016-10-04 16:29:14 -07:00
Bär Halberkamp
617f821291 Mafia: fix mistake 2016-10-05 00:49:39 +02:00
panpawn
7022704bf8 Add Dex repository to /opensource (#2809)
Apparently, a lot of people still don't know this is a thing, so this might be a good way of making people know it's actually a thing.
2016-10-02 22:04:58 -07:00
Guangcong Luo
f95276573a Fix crash in /bugs 2016-10-02 13:35:38 -07:00
sirDonovan
fafb2c1099 Fix crashes in datasearch commands
Loading data on the main process was accidentally removed in
64fa2b9801
2016-10-02 15:08:03 -05:00
The Immortal
88a1961f86 Remove Other Metagame of the Month link from /om 2016-10-02 18:10:50 +04:00
Bär Halberkamp
b986aa580a Mafia: Refactor votes 2016-10-02 15:41:36 +02:00
Bär Halberkamp
43de9b45df Mafia: bold people in votes 2016-10-02 15:41:36 +02:00
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
Guangcong Luo
b4a511a1e6 Update /rules
- Fix crash in PMs
- Permission is now `editroom`
- Now tells other mods that room rules have been updated
2016-09-30 00:09:32 -07:00
Bär Halberkamp
12c2e292c4 Mafia: fix spelling mistake 2016-09-30 04:32:25 +02:00
Bär Halberkamp
0d94959437 Mafia: display an announcement when town doesn't lynch 2016-09-30 04:32:25 +02:00
panpawn
f5271bb753 Refactor confirmed status to trusted (#2798)
It should be noted that various user functions have been renamed as well to reflect this change as well.
2016-09-29 13:02:14 -07:00
Bär Halberkamp
6473efcb27 Mafia: Allow changing your vote/target 2016-09-29 21:46:39 +02:00
Bär Halberkamp
c7f53370e9 Mafia: Fix day counter 2016-09-29 21:46:39 +02:00
Guangcong Luo
64fa2b9801 Replace CommandParser.globalPattern
I honestly don't know exactly why it exists (its commit didn't exactly
explain it), but Slayer95 thinks it's high-priority so this solution
should probably be sufficient?

?_?
2016-09-29 12:42:58 -07:00
Guangcong Luo
c9bf56f6ea Refactor roomsettings to use this.parse 2016-09-28 22:13:07 -07:00
Guangcong Luo
6b077d9453 Fix crash in /rules 2016-09-28 18:57:57 -04:00
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