* Minor changes to the help boxes of /ds and /ms
Removed parameters that do nothing (instruct, mimic), changed ssb examples (they were obsolete), added a couple more things. Would love to make the wall of mods you can use with both ds and ms smaller, since a lot of those don't actually change their behaviour, like randomroulette, but I'm not sure how to approach it. A hardcoded list of mods that change things is an option.
* Added "restricted" as a parameter
For a long time, connecting to non-localhost servers didn't work without
an HTTPS cert. But it's now once again possible. All you need is an
IP with an open port, and a dream.
Syntax is a little different than before. To go to `1.2.3.4` at port `5000`
- before: `http://1.2.3.4-5000.psim.us`
- after: `http://1-2-3-4--5000.insecure.psim.us`
Supporting multiple dots in the URL is too complicated, unfortunately.
The other way still works: `http://1.2.3.4:5000`
And yes, I would 100% recommend that one.
* Improve host/gameban
- Allow for offline namehostban and namegameban.
- Notify users when they get host and gamebanned.
- Fix hostbans, which did not work at all.
- Fix host and gamebanned users from being able to subhost
* Change aliases and remove gameban unhostbanning.
Today, a bug was found where using revealas on a long role crashed PS!
I alleviated this by adding a maximum role length (instead of having it be uncapped, as currently people could spam PS using unlimited length roles) and moving the 'infinite loop' check to not be triggered by long roles.
Co-authored-by: Meijer,L. (Lucas) <l.meijer6@students.uu.nl>
Nitpick; the button to check out a text ticket shows as "Claim" when someone else is already looking at the ticket or it is already closed, which doesn't really make sense.
https://www.smogon.com/forums/threads/clean-up-update-error-message-for-faq.3764560/
!faq fails no longer send the failed message message in chat, this is very helpful for room auth who are the users of broadcast commands
For whatever reason '!faq all' fails used a replybox? I can't think of a single non dev command that uses visible replyboxes in chat for fails, so changed this for an errorReply.
I cleaned up the wording of the /help faq, and I added some topics that were not there previously.
I figured PR #11105 would have some unintended side effect, but this
one isn't bad at all. There's no longer an easy way to tell whether
requests are move requests or not, but it's easy enough to instead
track the current turn.
* !rfaq fail over to !faq
Approved Suggestion: https://www.smogon.com/forums/threads/have-rfaq-fail-over-to-faq-if-a-match-is-not-found.3687458/
Code calls for RFAQ topics if that fails it checks the FAQ topic list. Sounds straightforward until you realize the faq broadcast fail command is archaic and for some reason the failed FAQ broadcast message still goes through on top of the actual faq error return message, along with the faq help, it's very messy I might just fix that next. This is bypassed by having the run broadcast call AFTER the topic is read as valid, so none of this nonsense can happen. I really thought this would be easy, turns out, not really (atleast for me).
Fix /removedaily, adding a new "all" option to work like it's
documented to work, and fix the documentation.
Also remove support for legacy image format. A lot of functions were
async that didn't need to be.
Also remove an entirely unused sorting pass mistakenly introduced in
11ab3d83f8
(The queue was sorted, then immediately ignored to iterate it by index,
which is for the best, because showing the queue in any order other
than queue order is not useful.)
Replace outdated (like, since XY outdated) links with current links.
I don't *love* dumping users at the Smogon Metagames forum, but there is no where else I am aware of that has all of our formats listed out.
Also updated the description to explain how /tier works and explain what type of information it contains.
https://www.smogon.com/forums/threads/clarification-on-how-long-a-ban-lasts.3761482/
2 day bans do not say the amount of time which can be confusing to new users as they think a room ban is permanent. This commit does so without influencing week room ban text logs which already do note the 1 week time limit. This is an approved suggestion on the forums as well.
* Make ds collapsible
* Make other search commands collapsible.
* Remove all as a parameter for searches
* use readmore element with content attrs defined
* Rework to support chrome due to details linebreak quirk
* Move the toggle button down to the results line for broadcast commands
* command properly functions when duplicated but cant broadcast with the normal name.
* Prevent users from providing no argument.
* Removed extraneous null check and ternary assignment.
* Remove extraneous newline.
* Update server/chat-commands/avatars.tsx
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* Adds trap as a search param to movesearch without modifying any moves.
* minor regex optimization.
* Implement in a less hacky manner.
* clean up adding both trapping statuses to the orgroup.
* Fixed conditional mixing trapped moves with other volatilestatuses.
* Implemented tier searching using inequalities.
* Fixed the value of OU being higher than CAP.
* Fixed AND searching for tiers with inequalities.
* Update server/chat-plugins/datasearch.ts
* Update server/chat-plugins/datasearch.ts
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
"Standard NatDex" is very weird compared to how OMs usually work.
See "TierShift Mod" and "Godly Gift Mod". NatDex now gets its own mod,
which can be mixed into any other format, instead of needing to start
with NatDex.
This would make Min Source Gen overriding annoying, so it now defaults
to the current gen in Gen 9+, if Obtainable is set and +Past isn't. So
now you don't need to manually set Min Source Gen to enforce Obtainable
in Gen 9.
NatDex Mod refactor caught a bug. `format.gen` isn't meaningful.
...maybe it should be... Main concern would be perf impact, to load
all the datamods to get their gen. Probably not worth it?
boolean -> number and number -> string should be explicit. Probably
string -> number should be, too, but I'm not ready to turn on the lint
option yet.
This was supposed to be part of the big ESLint refactor but I forgot
to push it. <_<
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.
- First, we no longer have separate eslint-no-types configs. Lint
performance shouldn't be enough of a problem to justify the
relevant maintenance complexity.
- Second, our base config should work out-of-the-box now. `npx eslint`
will work as expected, without any CLI flags. You should still use
`npm run lint` which adds the `--cached` flag for performance.
- Third, whatever updates I did fixed style linting, which apparently
has been bugged for quite some time, considering all the obvious
mixed-tabs-and-spaces issues I found in the upgrade.
Also here are some changes to our style rules. In particular:
- Curly brackets (for objects etc) now have spaces inside them. Sorry
for the huge change. ESLint doesn't support our old style, and most
projects use Prettier style, so we might as well match them in this way.
See https://github.com/eslint-stylistic/eslint-stylistic/issues/415
- String + number concatenation is no longer allowed. We now
consistently use template strings for this.
A private command table named /foo - say, with /foo bar and /foo baz - would leak its existence when /foo is used, reporting back that the command '/foo ' does not exist - whereas a nonexistent command would not have the trailing space.