Commit Graph

23714 Commits

Author SHA1 Message Date
Nol
b5ada89a74
Wi-Fi: Update Giveaway Message (#7004)
* Wi-Fi: Update Giveaway Message

* Remove Enter
2020-07-14 22:17:07 +02:00
The Immortal
594651587e ZU: Ban Ludicolo 2020-07-14 19:12:40 +04:00
Kris Johnson
1a92b731a0
Pet Mods: Add new buffs/QoL improvements (#7002) 2020-07-13 21:09:12 -07:00
Kris Johnson
b5177051f8
Cross Evolution: Fix validating with the set's species (#7003) 2020-07-13 21:08:32 -07:00
The Immortal
059c9c1d26 UU: Unban Durant and Mamoswine 2020-07-13 20:06:52 +04:00
The Immortal
342a8da614 Random Battle improvements 2020-07-13 19:22:04 +04:00
The Immortal
2085da965c Update Shared Power bans 2020-07-13 19:21:39 +04:00
Kris Johnson
028797257c
Add SM Mix and Mega (#6997) 2020-07-13 15:03:35 +04:00
Guangcong Luo
2e9328eada Support annotating chat commands
The nullable room refactor made it so there was no longer an easy way
to tell if a command could be used in PMs. This adds it back, as a
property on the handler function itself.

Now that we have properties on handler functions, I also added
`broadcastable` for whether or not the command is broadcastable.

It uses `Function#toString`, which is generally frowned-upon, but it's
well-specified and only happens during startup, so it shouldn't affect
performance after startup.

This also allows us not to need to repeat ourselves or give up
flexibility to have metadata about commands, which I think is worth the
tradeoff of reflection generally.
2020-07-13 00:55:23 -07:00
Guangcong Luo
52f0096c30 Refactor Auth.hasPermission
Half the permissions checks were previously in `user.can`, which is
unintuitive. It's now completely self-contained and should be pretty
readable, now, with `getEffectiveSymbol` and `hasJurisdiction` as
separate functions.
2020-07-13 00:55:23 -07:00
Kris Johnson
25af31372f
Fix /dt interaction with Galar starters' Gmax moves (#6994) 2020-07-12 23:37:59 -07:00
Kris Johnson
f742e2cf2c
Move Butterfree and Kangaskhan to PUBL (#6999)
https://www.smogon.com/forums/threads/pu-general-rules-tiering-and-announcements-thread.3660650/#post-8535959
2020-07-12 22:02:24 -07:00
The Immortal
8e186ba38d
Update Cross Evolution bans 2020-07-13 00:47:04 +04:00
The Immortal
3250252983
Move Linoone to RUBL 2020-07-13 00:34:02 +04:00
The Immortal
abc6d738af
Move Scolipede to UUBL 2020-07-13 00:32:41 +04:00
TheMezStrikes
f1507fbc35
Set global bot permissions in groupchats to bot (#6993) 2020-07-11 18:41:15 -07:00
The Immortal
260ebcb4ba NFE: Ban Arena Trap 2020-07-11 14:39:50 +04:00
Annika
b590d3c907
Add /noreply command (#6953)
This command should never be used by users.

This is for scripting, like buttons, like:

    <button name="send" value="/nofeedback /ionext">

so they don't spam your PMs.
2020-07-10 22:01:15 -07:00
Kris Johnson
0b08de687d
Move Gallade to NUBL (#6992)
https://www.smogon.com/forums/threads/np-nu-stage-2-dont-start-now-gallade-banned.3666717/#post-8533561
2020-07-10 19:36:41 -07:00
Jacob McLemore
30e420204a
Fix Fusion Bolt + Fusion Flare interaction when first move fails (#6991) 2020-07-10 16:29:53 -07:00
Guangcong Luo
9fe5a0e063 Improve "Message can't be blank" error
It was previously a popup, but there's no need for that anymore. An
`errorReply` is much friendlier.
2020-07-10 05:06:02 -07:00
asgdf
2136c34e8e
Fix trustuser commands (#6988) 2020-07-09 23:30:47 -07:00
Slayer95
0afd86221b
Linked: Fix priority of linked moves (#6990)
Second move in a chain ignores Gen 8 dynamic turn-order mechanic.
2020-07-09 23:17:28 -07:00
Mia
6690cfb037
Fix pollqueue page crash (#6986) 2020-07-09 22:19:43 -07:00
TheMezStrikes
a719c5f7e3
Trim !show image comment (#6987) 2020-07-09 16:08:51 -07:00
The Immortal
79684d0937 Multi-Attack's max move is 95 bp 2020-07-09 23:43:37 +04:00
Annika
db4bb7b46f
Roomevents: Delete events fully (#6984) 2020-07-09 05:00:43 -07:00
Annika
2c24650cf7
Daily spotlight: Fix regex to allow whitespace (#6985) 2020-07-09 05:00:22 -07:00
Annika
573eb439f8
Datasearch: Don't use Object.keys() in /ds monotype (#6982) 2020-07-08 15:39:46 -07:00
Annika
c2f4e524b8
Datasearch: Support /ds monotype without a type (#6981) 2020-07-08 15:12:40 -07:00
Kris Johnson
127a04b19e
Make improvements to the UNO game (#6980) 2020-07-08 15:12:14 -07:00
Kris Johnson
f00399ef62
Fix build (#6979) 2020-07-08 13:23:12 +04:00
Kris Johnson
49acf8ddc4
Move Orbeetle and Rotom-Frost to PUBL (#6978)
https://www.smogon.com/forums/threads/pu-general-rules-tiering-and-announcements-thread.3660650/#post-8530565
2020-07-07 21:57:10 -07:00
Guangcong Luo
faab60a618 Unify command logging code
Global punishments like /lock will notify Staff, and admin commands
like /updateserver will log to Staff, but this has been done ad-hoc
in the past.

To handle these cases, this commit introduces new chat-context
functions:

- `this.addGlobalModAction`,
- `this.privateGlobalModAction`
- `this.stafflog`

Other updates:

- the issue where Staff notifications didn't show up until someone talks
  has been fixed
- `privateModAction`s in Staff will now be visible in the scrollback
  log
- a bunch of commands that should notify Staff but didn't now do
- some typos in modlogs have been fixed
2020-07-07 18:51:29 -07:00
Guangcong Luo
d6de3ce6eb Fix typo in HTML scripted button validator 2020-07-07 21:27:04 -04:00
Annika
d2a61a2b9d
Daily spotlights: Add queue management commands (#6974) 2020-07-07 16:14:50 -07:00
Kris Johnson
255cd33635
Fix Megamax and NatDex BH (#6977) 2020-07-07 15:33:48 -07:00
urkerab
09350a01bf
Centralise the check for a restricted species (#6973) 2020-07-07 15:30:37 -07:00
Annika
2037764dd4
Porygon doesn't learn Defense Curl in Gen 2 (#6976) 2020-07-07 17:25:07 -04:00
Kirk Scheibelhut
2691b91062
Fix tour challenges (#6972) 2020-07-06 22:58:12 -07:00
ZestOfLife
a594f0b816
Mafia: Make CS indication more obvious for hosts (#6684) 2020-07-07 14:01:33 +09:30
Kirk Scheibelhut
eea2196280
Server side changes to support persistent user settings and privacy changes (#6947)
NOTE: This is changes the semantics of `hidenext`/`ionext` from
applying to the next created *battle* to applying to the next
created *search*/*challenge*.
2020-07-06 21:18:38 -07:00
Annika
d42e17b7ff
Trivia: Changes to the random category selector (#6971) 2020-07-06 21:16:57 -07:00
Kris Johnson
4703cb76f3
Megamax: Add Hone Claws to Grimmsnarl (#6969)
https://www.smogon.com/forums/threads/megamax-pet-mod-of-the-season.3658623/page-11#post-8525900
2020-07-06 17:15:26 -07:00
Guangcong Luo
9879d29cb8 /makechatroom no longer defaults to public 2020-07-06 17:12:01 -07:00
Kris Johnson
1a9d0611a6
Add quality-of-life fixes for Pet Mods (#6968) 2020-07-06 16:44:09 -07:00
Kris Johnson
4043f6e118
Fix bugs from recent restrictions update (#6967) 2020-07-06 15:54:14 -07:00
Guangcong Luo
c124720885
Support throwing error messages (#6946)
The idea is that throwing `ErrorMessage` will replace needing to pass
`context` variables around (which make it hard to unit test a lot of
chat functions).

I recognize the drawback is that it makes it harder to tell where
chat commands might return from. This might be somewhat alleviated by
a convention such as prefixing everything with `check`

    this.checkBroadcastable();

    this.checkCan('lock');

I honestly didn't like the old approach of `if (!this.can(...)) return`,
though. It didn't seem very obvious which commands would show error
messages and which needed you to write your own error messages. I think
the new system would at least be clearer about that.

We can also consider things such as some sort of sigil, such as:

    !this.checkCan('lock');

There's no other reason to use `!` at the beginning of a line, so I
think this is reasonably unambiguous, although it might take some
time to learn. Also we'd have to screw with eslint.

Another alternative is something all-caps?

    this.CHECK_can('lock');

In the end, I still think `this.checkCan('lock')` would be enough, and
I still think it's already an improvement in many ways.
2020-07-06 14:07:02 -07:00
Guangcong Luo
8b3a3e47cf global is no longer a RoomID 2020-07-06 14:06:00 -07:00
Marty-D
ef9bd7faf4 Add Doubles OU Dynamax Level 0 ladder 2020-07-06 14:33:47 -04:00