Commit Graph

23714 Commits

Author SHA1 Message Date
Quinton Lee
dce63c36d7 Validator: support supplementary banlists (#2794) 2016-09-29 00:41:06 -07:00
panpawn
a57e3828f3 Update to newest SockJS (#2795)
This is the latest stable version of SockJS
2016-09-28 22:30:33 -07:00
Guangcong Luo
0453a3d544 Improve dnsbl.js type comments
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...)
2016-09-28 22:13:07 -07:00
Guangcong Luo
c9bf56f6ea Refactor roomsettings to use this.parse 2016-09-28 22:13:07 -07:00
Guangcong Luo
d3dfe83d28 Refactor out CommandContext#namespaces
It does not appear to be used anywhere.
2016-09-28 22:13:07 -07:00
Guangcong Luo
b459771619 Refactor CommandParser
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.
2016-09-28 22:13:07 -07:00
Bär Halberkamp
37a79be36a Refactor BattlePokemon and BattleSide to use ES6 classes (#2792) 2016-09-28 20:57:13 -07:00
Guangcong Luo
48563dfb15 Fix /ME with roomauth 2016-09-28 18:57:57 -04:00
Guangcong Luo
6b077d9453 Fix crash in /rules 2016-09-28 18:57:57 -04:00
Quinton Lee
85a10e5f63 Validator: fix typoes in ban reasons 2016-09-28 17:24:07 -05:00
Marty-D
25ff3aaadc Gen III: Update move descriptions 2016-09-28 16:18:58 -04:00
Konrad Borowski
3adaba454f Include room title in tournaments information (#2793)
This allows client in future update to display titles.
2016-09-28 12:15:03 -07:00
panpawn
12052dee7c Allow bash to take multiline input (#2791) 2016-09-27 23:53:55 -07:00
urkerab
e853a61d58 Validate the template later once we know the real species (#2786) 2016-09-27 23:53:40 -07:00
Marty-D
024ab955d3 Add CAP 22: Kerfluffle 2016-09-27 19:53:37 -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
e87c072fe8 Suppress crash in roomgame 2016-09-27 04:23:40 -04:00
Bär Halberkamp
dcfc521b59 Refactor rooms.js to use ES6 classes (#2787) 2016-09-26 15:06:47 -07:00
Guangcong Luo
28f8521c91 Update battle log format
Closes #2732
2016-09-26 14:55:49 -07:00
Guangcong Luo
02deaed256 More reliable /updateserver
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.
2016-09-26 14:55:49 -07:00
Guangcong Luo
3280e453f6 Show error message for /bl show 2016-09-26 17:25:54 -04:00
Guangcong Luo
b1bfdeadcf Support passing roomid to /blacklists 2016-09-26 17:25:54 -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
Marty-D
c3f24da150 Gen IV: Update move descriptions
Also removes unneeded Hidden Powers.
2016-09-26 17:06:08 -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
8e4f762c23 ResourceMonitor: Warn less for too many battles 2016-09-25 23:47:00 -04: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
Marty-D
cd387d1847 Gen V, VI: Update several move descriptions
Also removes a handful of now-unnecessary base power callbacks from Gen
5.
2016-09-25 20:25:02 -04: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
53dd09fba0 Refactor modjoin
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
2016-09-24 23:14:16 -07: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
Guangcong Luo
845fc4db61 CONTRIBUTING.md: Add string standards
Closes #2710
2016-09-24 23:14:16 -07:00
Marty-D
bc652d4f62 Fix Struggle recoil timing
Fixes #2780
Also fixes a damage rounding issue.
2016-09-24 20:39:45 -04:00
The Immortal
269d54186c Almost Any Ability: Ban Poison Heal 2016-09-25 04:18:01 +04: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
Guangcong Luo
6d3a3bf7f0 Suppress crash in Users
Closes #2775
2016-09-24 13:50:59 -07:00
Guangcong Luo
07a1ca043a Stop shimming Array#includes
Our minimum requirement is now Node 6, which has native support for
Array#includes, so we no longer need to shim it.
2016-09-24 13:50:59 -07:00
Bär Halberkamp
8c9abad529 Mafia: fix a stupid typo 2016-09-24 22:50:19 +02:00
Bär Halberkamp
6294bc74be Fix unnamelock 2016-09-24 22:49:51 +02:00
Bär Halberkamp
341b8fcaac Fix checkNameInRoom 2016-09-24 22:49:51 +02:00
Bär Halberkamp
baad5271a4 Add /blacklistname 2016-09-24 22:49:51 +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
urkerab
1a191a696a Allow the banlist to specify a numeric limit of team properties (#2773) 2016-09-24 12:35:57 -07:00