Commit Graph

171 Commits

Author SHA1 Message Date
Guangcong Luo
d7ba455e2b Update permissions
Permissions have gotten out-of-date, so this commit syncs them.
Default permissions are now matched with Main, in particular including
the new & rank as admin (removing the old Leader rank and ~ symbol).

Relevant changes:
- Admin (~) and Leader (&) have been merged into Admin (&)
- The 'ban' permission was split into 'globalban' and 'ban'
- The 'broadcast' permission was renamed 'show' (going forward,
  "broadcast" should only refer to the big red/blue/green
  announcement bars.)
- Bots no longer have global moderation abilities, making it
  easier to give untrustworthy bots the "bot" rank.
2020-07-03 17:32:49 -04:00
Guangcong Luo
6af875af8b Improve RoomPermission/GlobalPermission checks
Global permissions can no longer be used as room permissions. Instead,
the two are entirely separate lists, with only a few permissions in
both lists.
2020-06-21 03:53:06 -07:00
Mia
6c97866f83
Add commands to show media in chat (#6745) 2020-06-16 14:40:10 -07:00
Guangcong Luo
902dfaba4f Better document debug options in config-example.js 2020-06-13 15:58:35 -07:00
Guangcong Luo
d592c838c2 Separate Config.ofemain and Config.ofesockets 2020-06-12 22:02:32 -07:00
Mia
c246ae51b4
Support searching roomlog entries (#6494) 2020-05-25 18:22:51 -07:00
Mia
1628258371
Typescript chat-commands/core (#6484)
Also fix TS line numbers in GitHub Actions
2020-03-23 23:50:35 -07:00
Christopher Monsanto
4cb531e4a8
Add Config.startuphook (#6382)
This is called when the server is fully initialized and ready to serve
requests. Useful for notifying a process manager.
2020-02-22 15:51:18 -08:00
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