Commit Graph

163 Commits

Author SHA1 Message Date
asgdf
e40d24fd5a Allow drivers to set modchat by default (#6152) 2019-12-16 14:28:05 +09:00
Waleed Hassan
a518cf102a Take steps to statically type Config (#5920)
This commit changes the TypeScript global variable of `Config` from
`AnyObject` to `Config & AnyObject`.

It still falls back to `AnyObject` (hence the 'Take steps') because of
the main-specific `Config` properties that are used without being in the
`Config` object itself.

These can be added by someone with access to the PS main server.

Regardlesss, this is an improvement as IntelliSense can display and
autocomplete the known properies.

In addition, the TypeScript compiler will now report bugs
concerning the types of the properties, which I have fixed in this
commit.
2019-10-30 18:45:20 +10:30
whales
d52e57eebd Prevent non-staff from seeing their own IPs (#5845) 2019-10-05 02:38:07 +10:00
Kirk Scheibelhut
4326aeae04
Add forcedpublicprefixes for public OLT battles (#5661) 2019-08-01 09:28:48 +02:00
Guangcong Luo
a3ba27ba8f Improve modchat
- Modchat permission code should be simpler now
- Mods now have 'modchatall' (can set modchat up to their own rank)
- 'modchatall' (ROs) can no longer remove modchat higher than their own
  rank
- 'makeroom' (Leaders) still can remove higher modchat
2019-07-20 08:53:16 -05:00
Kirk Scheibelhut
a61c10eeb8
Remove hardcoded URLs in favor of Config.routes (#5557) 2019-07-01 10:19:21 -07:00
Bär Halberkamp
ed5d534224
Add an AFK timer and status messages (#5002) 2019-07-01 01:47:13 +02:00
jetou
da32e5c4c2 Support requesting ties (#5454) 2019-05-23 17:42:34 +01:00
JetOU
c9e1aba256 Allow Players to /exportinputlog (#5457) 2019-04-20 22:34:28 +09:30
TheMezStrikes
0ac6e55adf Allow Room Owners to use addhtml (#5409) 2019-04-06 01:55:26 +08:00
urkerab
87ccf476c6 Allow SSL options to point to symlinks (#5018) 2018-12-10 07:14:19 -06:00
Guangcong Luo
228b67d712 Update config-example.js for TypeScript 2018-11-27 14:36:45 -06:00
Lycanium Z
8f73f39109 Prevent room and staff introductions in battles (#4942) 2018-11-18 22:00:12 -06:00
Guangcong Luo
09700645de Update config-example with SSL documentation
I'm 80% sure SSL is currently supported, so I'm updating config-example
with documentation for it.
2018-11-04 09:09:09 -06:00
urkerab
46e54e950f Fix http:// (#4828) 2018-08-26 15:02:25 -05:00
Guangcong Luo
7596746a1f TypeScript config-example.js
This prevents TypeScript 3 from complaining about config.js.
2018-08-11 21:46:04 +09:00
whales
e195a5729a Consolidate 'gamemanagement' permissions (#4668)
Also fix groupchat creation/deletion permissions.
2018-05-13 22:03:40 -05:00
Bär Halberkamp
15a047ab02 Use Room Host for owners of groupchats instead of Room Owner
Also tweak Room Host permissions so they are no longer identical to room owners
2018-05-12 19:11:02 +02:00
Guangcong Luo
cd2a462d94 Change default /exportinputlog permission 2018-02-08 20:40:36 -05:00
Guangcong Luo
cebeb1a48a /importinputlog users are now Host, not Player 2018-02-04 04:48:56 +09:00
HoeenHero
8fb4712397 Fix permission checking for promotions (#4336) 2018-01-13 21:18:28 -06:00
Ben Davies
540ce1513c Sockets: disable Config.wsdeflate by default
So it doesn't nag admins over not installing an optional dependency
2017-12-17 04:32:03 -04:00
Morfent
777ba0fc5f Sockets: implement permessage-deflate support (#4253)
Permessage-deflate is an extensIon that compresses websocket messages with zlib.
SockJS already supports it (indirectly) and the client's load balancer already
inserts the header in the opening handshake when making a WebSocket connection.

Config.wsdeflate makes this optional and allows tweaking the extension's resource
usage.
2017-12-15 15:43:48 -06:00
Guangcong Luo
ce8dc52501 Replace ofe with node-oom-heapdump
(ofe is no longer actively maintained)
2017-11-17 19:39:54 -06:00
Guangcong Luo
3185e98809 Add Host usergroup/rank
Currently just a placeholder, not used for anything yet.
2017-11-12 23:34:43 -06:00
Bär Halberkamp
2d8d9d42d0 Add a config option to disallow links for non-ac users (#4087) 2017-10-28 11:12:06 -05:00
Ben Davies
94c317b9ec Config: add missing documentation for networking-related settings (#3988)
`Config.workers` especially deserves to be documented. The other config
settings don't entirely need to be documented, but for the sake of
transparency `Config.ssl` and `Config.bindaddress` have been added as
well.
2017-09-17 19:52:12 -04:00
panpawn
877ecde1e8 Locked symbol: Use unicode code point (#3938)
This should use the unicode instead of the actual character itself for the same reason the player rank does - some text editors don't like unicode and will override this with an actual question mark.
2017-09-01 19:28:43 -04:00
panpawn
74656f9d84 Refactor disabling hotpatch (#3904)
Also, the actual notifications when an admin hotpatches is now smarter - it will tell the rooms if a hotpatch failed, and it will only tell the rooms after a hotpatch has happened, not before.
2017-08-23 02:24:28 -07:00
Guangcong Luo
5f196b4b9c Implement Config.laddermodchat
Allow configuring ladder modchat levels separately from PM modchat
levels.
2017-07-30 23:39:44 -04:00
Charlie Kobayashi
e4fe38126e Rooms: send a |customgroups| message on connect (#3529) 2017-06-19 16:12:52 -07:00
Ben Davies
b66e395bf6 Add Config.ofe, refactor optional dependency usage (#3644)
Config.ofe toggles whether or not to write heapdumps if sockets workers
run out of memory, since ofe is an optional dependency but is not
installed by default. nodemailer is now a nonDefaultDependency, and
will complain if it's not installed when Config.crashguardemail is
enabled.
2017-06-17 14:37:11 -07:00
panpawn
103f4828ae Automatically kill server on 0 battles in lockdown (#3635)
This allows for when the server is in lockdown, and the final battle finishes, for the server to automatically kill itself.
- Setting Config.autolockdown to false will turn this off.
- This also adds a new command to toggle Config.autolockdown
- This also introduces Rooms.global.notifyRooms
2017-06-14 13:57:52 -05:00
Ben Davies
015dd8db65 REPL: add Config.repl, refactor, Typescript (#3609)
- `Config.repl` enables/disables using REPL sockets since it doesn't
make as much sense to configure whether or not it's enabled with the
REPL_ENABLED const
- exports.start takes a filename parametre rather than a prefix and a
suffix one to avoid having to mutate parametres
- dead REPL sockets are removed from the sockets list when the server
emits an error, and the server closes on error now before respawning
the server
- made the file ready for Typescript
2017-06-11 10:40:38 -05:00
Ivo Julca
8a0e996351 Update jurisdictions in config example for new Player symbol 2017-03-04 20:12:32 -05:00
panpawn
66c38b7430 Change Player rank from ★ to ☆ (#3240)
There is a client-side counterpart to this.
2017-02-23 05:03:45 -06:00
Bär Halberkamp
075b9f03cb Implement an autolock for multiple roombans 2016-12-12 00:26:14 -08:00
Bär Halberkamp
1a7b63e78a Add a config option for PunishmentsMonitor 2016-12-02 00:53:18 +01:00
panpawn
41f6ee6e95 Add undocumented tournament Config options (#2862)
These are used within the tournament code, but they aren't documented...

This also changes:
 Config#tournamentDefaultPlayerCap  -> Config#tourdefaultplayercap
 Config#istournamentsrated -> Config#ratedtours
2016-11-07 23:11:13 -08:00
panpawn
e877fc9174 Remove unused documented config-example perm (#2857)
The redirect command actually uses the 'warn' permission, and it seems as though this permission actually isn't a permission of any of the ranks currently.
2016-10-26 18:57:04 -05:00
Guangcong Luo
270db5d1c0 Update login server public key 2016-09-18 08:13:48 -07:00
panpawn
1cb3403b4d Slowchat: Use editroom permission (#2663)
Also, let's only allow slowchat to be turned on if a room has at least 10 users in it.
2016-08-02 04:11:29 -05:00
Guangcong Luo
31e13ce690 Update config for 311dccb3ca 2016-08-02 03:06:50 -05:00
panpawn
32005690c3 Implement slowchat system (#2657)
This is basically a system that allows for room moderators or higher to set a minimum time between a user's messages sent to the room.
This is especially helpful for times the server might be lagging or the chat is just moving much too fast.
Alternatively, this could also help to stop spammers in their tracks and give staff more time to handle them as well.
2016-07-31 19:07:09 -05:00
panpawn
36d7728b06 Update help commands to reflect new bot rank (#2634)
Also, give the bot rank the new addhtml permission in config/config-example.js

... And, we are going to fix promoting locked users to rank bot.
2016-07-20 19:50:47 -06:00
panpawn
5858c809c9 Implement bot rank (server-side) (#2632)
This was inspired by https://github.com/Zarel/Pokemon-Showdown/pull/2471

We are also removing the github-specific code from /htmlbox as well, removing the modchat alias of * for player, and we are giving room owners and leaders the roombot permission so they can promote to it.
2016-07-20 16:47:37 -06:00
kotarou3
952cefbad4 Minor crash guard changes (#2470)
- Remove unused crash guard comment
- Update Config.crashguard comment a bit
- Use Config.crashguard to disable it in tests
2016-04-17 02:15:17 -07:00
The Immortal
952a9daf3f Update tour announcements feature 2016-03-25 00:18:06 +04:00
sirDonovan
f28489eddd Tournaments: update tournament announcements
- change the config option to room-specific options
- update rooms after adding announcements
2016-03-23 01:02:47 -05:00
Bär Halberkamp
3465829e22 Add permissions for roomgames 2016-02-26 22:19:19 +01:00