Commit Graph

658 Commits

Author SHA1 Message Date
Mia
028abd6377 Helptickets: Ensure reported battles have replays saved upon ending
This is relevant since future staff may want the full log, and we don't want cases where only half the replay is saved.
2021-11-12 20:31:24 -06:00
Mia
09be6e8439 Moderation: Add the alias weekroomban to /roomban
Requested for clarity.
2021-11-10 09:27:46 -06:00
Mia
182ed60221 CRQ: Default to undefined on some userdetails data to save bandwidth
Per https://github.com/smogon/pokemon-showdown/pull/8512/files#r743947584
2021-11-05 16:38:10 -05:00
Mia
ea9993fcec Update max reason length for moderation commands 2021-11-04 11:48:45 -05:00
singiamtel
a7cdf95c5a
CRQ: Don't send your own friend status in userdetails 2021-11-02 12:05:20 -05:00
Mia
bd38434a2b Punishments: Don't count custom room punishments toward PunishmentMonitor 2021-10-24 20:02:17 -05:00
Annika
9c08822cff Revert Multi Battle changes 2021-10-24 17:13:10 -04:00
Mia
88ef7fdf1f
Support marksharing ranges (#8498) 2021-10-24 12:44:46 -07:00
Mia
0f5c9c133b
Support searching multi formats (#8172) 2021-10-24 12:04:57 -07:00
Volco
f96762b185
Fix crash in room promotions (#8500) 2021-10-23 23:25:56 -07:00
FeluciaPS
f3aaba2dd4
Specify Global for global promotion messages (#8499) 2021-10-21 20:12:58 -07:00
Mia
d45590816b
/noforcerename: Use Utils.splitFirst
This makes it so we don't accidentally allow guest names (since it no longer does users.get)
2021-10-21 08:26:48 -05:00
Mia
05072216a2 /ipsearchall: Check full user.ips array 2021-10-19 11:11:26 -05:00
Mia
8a06826bfa Add /noforcerename
Requested by Aeonic. This makes it so the Punishments.namefilterwhitelist now makes users outright immune to FRs, instead of just having it logged / immune to one FR. If they're on the namefilter whitelist, they have to be taken off before they can be renamed, as opposed to just being able to log onto the acc anyway. It also ensures only US can add / remove to that list.
2021-10-11 19:19:29 -05:00
Mia
f80c066434 Moderation: Properly modlog ips for yearlocks 2021-10-06 16:07:00 -05:00
Mia
a0227dfaeb /whois: Privatize more punishments to global staff
Roomstaff have no use for these. (Wob said this was OK).
2021-10-04 08:21:58 -05:00
FeluciaPS
a032accccf
Add html pages to multiline commands (#8483) 2021-09-30 16:44:39 -05:00
Mia
41877078d2 Moderation: Update offline warn phrasing 2021-09-27 11:35:20 -05:00
Mia
77d81b33c9 Moderation: Have /namelock tempban names after the lock expires
Requested by DaWoblefet (for consistency, since namelocking a name and not having it tempbanned is confusingly inconsistent).
2021-09-27 11:08:11 -05:00
Mia
a7d27dde3a Add help for all commands in server/chat-commands/ 2021-09-23 12:11:55 -05:00
Mia
6cdfb14812 Fix build 2021-09-23 09:36:08 -05:00
Mia
8379e3923a Validate data:image inputs for media commands
This gives explicit messages to ensure people don't try to /show it.
2021-09-23 08:31:11 -05:00
Mia
d6415445d0 Improve offine forcerenames
This mostly just sets user.trackRename when the user tries to log in for the first time. Requested by DaWoblefet.
2021-09-22 19:13:07 -05:00
Mia
c19309c1ad Moderation: Support year-locking names
Approved by Aeonic and Teclis.
2021-09-20 18:10:28 -05:00
Mia
24e1dcbe24 Ladders: Add timestamps to challenge notifications 2021-09-19 14:13:36 -05:00
PartMan
35a917d418
/help: Trim commands (#8461)
```
[09:45:39] @PartMan: !h status
Could not find help for '/status ' - displaying help for '/status' instead
/status [note] - Sets a short note as your status, visible when users click your username.
Use /clearstatus to clear your status message.
```
2021-09-18 15:54:42 -07:00
Mia
60998a00c9 Update /help automodchat 2021-09-18 11:58:21 -05:00
Mia
d3d2bacf10 Moderation: Make /modnote [userid] log the [userid] as the target user
Staff QoL. This will make notes of /mn [userid] show up under /mlid userid (or /ml user='username', etc).
2021-09-17 12:50:05 -05:00
Mia
a2890bc7d1 Moderation: Log offline warns to Staff 2021-09-16 09:07:17 -05:00
Mia
c912e3bd45 Roomsettings: Fix /modjoin sync
This fixes https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/post-8710045. This changes /modjoin sync so that (if there's no modchat set)  instead of looking for the lowest staff group (in order to set modchat), it looks for the lowest (non reg/whitelist) group that the user can set it to instead. Previously, it looked for the lowest group with the mute permission - bot, which regular users cannot set modchat to in battles.
2021-09-15 19:19:42 -05:00
Kris Johnson
c2f5ccc106 Update /battlerules 2021-09-14 23:24:46 -06:00
Mia
9b435b2f0e Moderation: Add hints about forcelock and forcenamelock 2021-09-12 20:10:42 -05:00
Mia
6ac4309b94 Moderation: Make /warn work in PMs
Useful functionality. Plus, people were confused why it worked for other punishments and not this. If necessary, Wob also approved of this.
2021-09-11 21:09:01 -05:00
Kris Johnson
fff385b42f /hiderank: Fix typo 2021-09-08 17:42:41 -06:00
Kris Johnson
e1e7296b2e /hiderank: Let higher rank SLs hiderank as SLs 2021-09-08 16:24:32 -06:00
PartMan
25173a4027
/details: Don't show G-Max moves in old gens (#8463) 2021-09-08 00:37:18 -06:00
AeonicX7
2e7fd45cd8
/groups: Document Section Leaders (#8448) 2021-09-02 13:59:52 -07:00
pacmanboss256
23b35498f6
Rename the "mystery" and "authentic" move flags (#8445)
* mystery -> allyanim
* authentic -> bypasssub
2021-08-30 23:07:50 -07:00
Mia
7811795344
Handle new TypeScript version (#8449)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-08-30 20:11:44 -07:00
Mia
3ece2f9eef /evalsql: Fix error handling 2021-08-22 19:47:20 -05:00
Mia
8cf1035ee2
SQL: Automatically prepare statements unless told otherwise (#8439) 2021-08-18 12:51:39 -07:00
Mia
77861ceae6
SQL: Use a QueryProcessManager subclass (#8422) 2021-08-14 17:45:51 -07:00
Mia
23e4c8f534 Chat: Properly privatize the /help of private commands
This ensures only users who can use said private commands can view the help (and it's no longer a catch-all 'lock' perm)
2021-08-13 12:17:48 -05:00
Annika
633e061067 Modlog: Remove text logging code 2021-08-09 14:06:14 -07:00
Mia
8229357586 Add some useful aliases to /yearlockname 2021-08-04 15:31:42 -05:00
Quinton Lee
b5130dfb57
Commands: Add feedback to /notifyuser (#8411) 2021-07-25 15:33:20 -07:00
Annika
982c357f88 /evalsql: Fix bug 2021-07-23 15:27:10 -07:00
Annika
bcbe100c41
Modlog: Use SQLite for searches (#8004) 2021-07-23 13:47:49 -07:00
Mia
bdeb9c538a Support /blockchallenges friends 2021-07-22 21:18:52 -05:00
Mia
a0b1fa1cc5 /crq: Inform the client if the user is friended
Necessary for upcoming changes.
2021-07-22 14:56:27 -05:00
Mia
d5bb0945ff Moderation: Stop forcing /globalban on untrusted users
This caused issues with banning offline users, and while I was fixing it I started to question why this was necessary at all.
2021-07-22 02:22:52 -05:00
Annika
19c6daf9f2 /evalsql: Make table scroll horizontally 2021-07-21 14:34:25 -07:00
Mia
879bb9dc18 /evalsql: Destroy DB after use 2021-07-21 15:06:14 -05:00
Mia
9ed2c0036f
Add a command for evaluating SQLite (#8407) 2021-07-21 13:05:02 -07:00
Mia
e5fbd64427
Support adding friends (#7333) 2021-07-16 12:56:34 -07:00
Kris Johnson
40e36c8f38
Make adjustments to Section Leaders (#8387) 2021-07-16 12:51:29 -07:00
PartMan
ddec31a24f
Add /notifyuser (#8394) 2021-07-16 12:50:45 -07:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
TheSupervillain
1ef25735b9
Avatars: Change Duel Disk to Wonder Launcher (#8380) 2021-07-07 21:58:24 -07:00
Karthik
73eed0d40b
Show "Bypasses Protect" flag in /dt for ally-targeting moves (#8384) 2021-07-06 11:59:55 -07:00
FeluciaPS
ad406e37c6
Add htmlfaq to multi-line commands (#8379) 2021-07-04 15:57:47 -07:00
Guangcong Luo
a3eec79627 Update documentation for /avatarhelp 2021-07-04 17:05:01 -05:00
Annika
3403cc0d93 /whois: Fix formatting for punished previous names 2021-07-02 19:49:43 -07:00
Annika
56754afb42 Punishments: Remove getPunishType functions
These are poorly designed as they only return one punishments, but users can now have several.
2021-06-29 17:55:45 -07:00
Mia
7fe886302c /botmsg: Fix filter check 2021-06-29 00:45:29 -05:00
Mia
5430bf4365 Fix build
Unsure why ESLint did not throw this for me.
2021-06-28 21:50:56 -05:00
Mia
d829ceeff4 Chat: Validate command recursion 2021-06-28 21:28:30 -05:00
Distrib
e9a5bc9332
/blockchallenges: Support allowing challenges from certain groups (#8362) 2021-06-26 17:28:03 -07:00
Mia
817986de92 Moderation: Restrict seeing punishments for non-staff trusted users 2021-06-23 16:25:42 -05:00
Mia
558c4e3a4a Moderation: Only allow non-staff trusted users to see locks and bans on /offlinewhois
Approved by Aeo.
2021-06-23 16:05:51 -05:00
PartMan
0d7159b12c
/botmsg: Permit ROs too (#8370)
(Bots become ROs of subroom groupchats if they create them.)
2021-06-22 15:52:54 -07:00
Mia
fe338a84f5
Support locking usernames for a year (#8371) 2021-06-22 15:10:16 -07:00
Karthik
5db9d39756
Support default format for randbats commands (#8367) 2021-06-22 12:06:02 -07:00
Mia
b0e839e1e8 Moderation: Only log /rangeban to Staff 2021-06-15 18:16:06 -05:00
Mia
bdd08acecb Info: Fix /regdate display for registration time 2021-06-03 13:46:14 -05:00
Annika
b712278fd0
Use global punishments instead of fake rooms (#8350) 2021-06-02 21:54:33 -07:00
Mia
01a7132e0e Fix alt display in /whois 2021-06-02 14:19:16 -05:00
Mia
59377f5a47
Info: Fix /show and /requestshow interaction error (#7904) 2021-06-02 11:03:00 -07:00
Guangcong Luo
a338dad78a Fix challenge notifications
This is a temporary fix; the real fix is a decent margin more
complicated, unfortunately...
2021-05-31 20:05:47 -04:00
Mia
c237e18672 Fix previous names display in /whois 2021-05-31 14:25:26 -05:00
Mia
6562a14385 Fix punishment reason displays in /whois 2021-05-31 13:16:31 -05:00
Mia
09e298f15b
Punishments: Support giving multiple punishments to one user (#8265) 2021-05-31 11:06:01 -07:00
Mia
c29a9a1eb1 Moderation: Explicitly note if punishments are done with no user object 2021-05-27 21:29:59 -05:00
Annika
fd9b922e86 /sectionleader: Get user object exactly 2021-05-27 11:21:35 -07:00
Guangcong Luo
74211859c9 Update to TypeScript 4.3
Changes relevant to our codebase:

- TypeScript now knows that `typeof id === 'string'`! A bunch of casts
  on `User | ID` or `Room | RoomID` are no longer necessary!!!

- `override` will protect against certain typoes, and we'll adopt it
  (and `--noImplicitOverride`) as soon as sucrase comes in

- `declare` is now required for properties we want to narrow the type
  of without directly overwriting - a good thing to use going forward,
	but very annoying to fix all our old code for
2021-05-26 14:16:54 -07:00
Mia
66261e99d2
Admin: Support /eval in PMs (#8249) 2021-05-25 16:28:09 -07:00
PartMan
69e71297e8
/punishments: Use toID (#8332) 2021-05-24 11:18:32 -07:00
Mia
961e5b90d0 /clearlines: Trim reasons 2021-05-24 11:34:26 -05:00
Guangcong Luo
d8f492d209 Fix bugs in IP and IP range support
IPTools has gotten a bit buggy since the last time I looked at it. This
fixes `IPTools.ipRegex` to actually validate IPs, and adds a new
`IPTools.isValidRange` validation function.

`/ipsearch` now also supports all three IP range formats, thanks to
being refactored to use `IPTools.checker`.

Fixes #8330
2021-05-23 20:48:31 -07:00
Guangcong Luo
49cacba6cf Support !rebroadcast to bypass broadcast cooldown
The old system where only admins can bypass the broadcast cooldown
is weird, because it's wrong in both directions: Admins could
unintentionally re-broadcast, but other users couldn't intentionally
re-broadcast.

Now no one can unintentionally re-broadcast and everyone can
intentionally re-broadcast.
2021-05-23 19:41:07 -07:00
Guangcong Luo
4a716f1456 Use aliases for !formathelp broadcast cooldown
(This makes it so if someone uses `!om sketch` it will prevent use
of `!om sketchmons` for a while.)

Suggestion thread: https://www.smogon.com/forums/threads/make-the-broadcast-cooldown-for-commands-apply-to-aliases-of-that-command.3684569/
2021-05-23 18:23:52 -07:00
Marty-D
abec21011f
Add more missing Trainer avatars 2021-05-22 13:47:23 -04:00
Annika
5b50c31507 /blockpms: Normalize capitalization 2021-05-19 18:07:26 -07:00
Guangcong Luo
c695620e58
Refactor to new challenge system (#8303)
See PR for full details:

https://github.com/smogon/pokemon-showdown/pull/8303
2021-05-17 07:15:01 -07:00
pacmanboss256
4186ef5f4f
Refactor Mold Breaker effect (#8291) 2021-05-14 08:32:41 -04:00
Quinton Lee
3783f11ea0
Implement /sendprivatehtmlbox (#8285) 2021-05-14 02:47:33 -07:00
Guangcong Luo
509d0abad4 Refactor out some Object.keys invocations
If you need values, you should be using `Object.values` or
`Object.entries` directly.
2021-05-13 23:02:04 -07:00
Mia
12b319e713 Helptickets: Add claiming and add more punishment types to text tickets 2021-05-13 08:34:52 -05:00
Mia
7c1be296e6 Roomsettings: Don't allow locked users to set modchat
People are spamming with this. See comment for why it's not in the other access denied check.
2021-05-12 13:26:39 -05:00
Mia
79b716bb06 Moderation: Show forcerenames to regular users in helptickets
Requested by Ransei.
2021-05-11 12:08:53 -05:00