Julian Giebel df95be1ce5 Kick on ban for entire server group (#28649)
* Start work on PostgresNotificationManager
Implement initial version of init and listening code

* Finish implementing PostgresNotificationManager
Implement ban insert trigger

* Implement ignoring notifications if the ban was from the same server

* Address reviews

* Fixes and refactorings

Fix typo in migration SQL

Pull new code in BanManager out into its own partial file.

Unify logic to kick somebody with that when a new ban is placed directly on the server.

New bans are now checked against all parameters (IP, HWID) instead of just user ID.

Extracted SQLite ban matching code into a new class so that it can mostly be re-used by the ban notification code. No copy-paste here.

Database notifications are now not implicitly sent to the main thread, this means basic checks will happen in the thread pool beforehand.

Bans without user ID are now sent to servers. Bans are rate limited to avoid undue work from mass ban imports, beyond the rate limit they are dropped.

Improved error handling and logging for the whole system.

Matching bans against connected players requires knowing their ban exemption flags. These are now cached when the player connects.

ServerBanDef now has exemption flags, again to allow matching full ban details for ban notifications.

Made database notifications a proper struct type to reduce copy pasting a tuple.

Remove copy pasted connection string building code by just... passing the string into the constructor.

Add lock around _notificationHandlers just in case.

Fixed postgres connection wait not being called in a loop and therefore spamming LISTEN commands for every received notification.

Added more error handling and logging to notification listener.

Removed some copy pasting from SQLite database layer too while I was at it because god forbid we expect anybody else to do all the work in this project.

Sorry Julian

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2024-08-20 23:31:33 +02:00
2024-08-15 16:22:01 -06:00
2024-02-19 10:08:05 -08:00
2024-06-02 15:49:31 -04:00
2024-06-02 15:49:31 -04:00
2023-12-15 18:19:48 +01:00
2024-01-02 14:28:02 +11:00
2024-02-09 23:31:01 -05:00
2024-06-19 21:33:02 +02:00
2024-06-19 21:33:02 +02:00
2024-02-19 10:08:05 -08:00

Space Station 14

Space Station 14 is a remake of SS13 that runs on Robust Toolbox, our homegrown engine written in C#.

This is the primary repo for Space Station 14. To prevent people forking RobustToolbox, a "content" pack is loaded by the client and server. This content pack contains everything needed to play the game on one specific server.

If you want to host or create content for SS14, this is the repo you need. It contains both RobustToolbox and the content pack for development of new content packs.

Website | Discord | Forum | Steam | Standalone Download

Documentation/Wiki

Our docs site has documentation on SS14s content, engine, game design and more. We also have lots of resources for new contributors to the project.

Contributing

We are happy to accept contributions from anybody. Get in Discord if you want to help. We've got a list of issues that need to be done and anybody can pick them up. Don't be afraid to ask for help either!
Just make sure your changes and pull requests are in accordance with the contribution guidelines.

We are not currently accepting translations of the game on our main repository. If you would like to translate the game into another language consider creating a fork or contributing to a fork.

Building

  1. Clone this repo.
  2. Run RUN_THIS.py to init submodules and download the engine.
  3. Compile the solution.

More detailed instructions on building the project.

License

All code for the content repository is licensed under MIT.

Most assets are licensed under CC-BY-SA 3.0 unless stated otherwise. Assets have their license and the copyright in the metadata file. Example.

Note that some assets are licensed under the non-commercial CC-BY-NC-SA 3.0 or similar non-commercial licenses and will need to be removed if you wish to use this project commercially.

Description
A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
Readme 891 MiB
Languages
C# 92.7%
Fluent 6.8%
Python 0.3%