Commit Graph

497 Commits

Author SHA1 Message Date
hacker
8ce3ea5f2c Log chat messages on the server 2025-11-02 03:05:19 +00:00
Paul Chote
67254e0b39 Rename Fluent *GetString methods to GetMessage. 2024-11-03 16:52:47 +02:00
Paul Chote
464e0dc7d2 Rename Localized to Fluent. 2024-10-04 15:11:27 +03:00
Paul Chote
d6285affec Remove FluentBundle.Arguments helper method. 2024-10-04 15:11:27 +03:00
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
Matthias Mailänder
4e5556dccc Expose player names to localization. 2024-08-05 12:55:59 +03:00
RoosterDragon
9d5d2ab493 RCS0056 - roslynator_max_line_length = 180 2024-07-29 21:56:36 +02:00
RoosterDragon
b58c1ea5bc Provide names and pools when creating MiniYaml.
- Rename the filename parameter to name and make it mandatory. Review all callers and ensure a useful string is provided as input, to ensure sufficient context is included for logging and debugging. This can be a filename, url, or any arbitrary text so include whatever context seems reasonable.
- When several MiniYamls are created that have similar content, provide a shared string pool. This allows strings that are common between all the yaml to be shared, reducing long term memory usage. We also change the pool from a dictionary to a set. Originally a Dictionary had to be used so we could call TryGetValue to get a reference to the pooled string. Now that more recent versions of dotnet provide a TryGetValue on HashSet, we can use a set directly without the memory wasted by having to store both keys and values in a dictionary.
2024-01-21 12:39:10 +02:00
RoosterDragon
e6914f707a Introduce FirstOrDefault extensions method for Array.Find and List.Find.
This allows the LINQ spelling to be used, but benefits from the performance improvement of the specific methods for these classes that provide the same result.
2023-11-19 19:28:57 +02:00
RoosterDragon
acca837142 Fix RCS1246 2023-11-19 19:28:57 +02:00
RoosterDragon
330ca92045 Fix RCS1077 2023-11-19 19:28:57 +02:00
Paul Chote
3f4f9e7354 Introduce ServerType.Skirmish. 2023-11-17 10:28:52 +02:00
RoosterDragon
360f24f609 Fix IDE0055
This rule no longer appears to be buggy, so enforce it. Some of the automated fixes are adjusted in order to improve the result. #pragma directives have no option to control indentation, so remove them where possible.
2023-11-16 08:45:10 +02:00
RoosterDragon
b97d1a4c6c Fix IDE0090 2023-11-15 19:13:17 +02:00
RoosterDragon
9a3c39878d Fix RCS1236 2023-11-10 10:38:41 +02:00
RoosterDragon
fbe147ce61 Fix RCS1118 2023-11-10 10:38:41 +02:00
RoosterDragon
4dd787be13 Fix RCS1061 2023-11-10 10:38:41 +02:00
RoosterDragon
5d91b678bb Use spans to improve performance in StreamExts.
Also avoid ReadBytes calls that allocate a buffer by either updating the stream position (if not interested in the bytes), by reusing an input buffer (if interested in the bytes), or using a stackalloc buffer to avoid the allocation (for small reads).
2023-11-10 10:25:39 +02:00
Paul Chote
72646fc7ff Add Server.MapPool setting for dedicated servers.
This takes a list of map UIDs which may be locally installed or hosted
on the resource center. If any maps aren't found, startup will be
delayed by up to 10 seconds while it attempts to query the resource
center.
2023-11-05 15:42:35 +02:00
Gustas
144e716cdf Add vote kick 2023-09-27 10:41:13 +03:00
abcdefg30
e41279fe6b Fix terrain positions for targets not being serialized for Orders 2023-09-19 11:44:49 +03:00
RoosterDragon
f5f2f58664 Use Stream.Write(int) extension method where possible. 2023-08-29 16:17:27 +02:00
RoosterDragon
d83e579dfe Fix CA1305 2023-08-07 21:38:09 +02:00
Matthias Mailänder
c234b4c78f Send the join message/ping also in skirmish. 2023-08-04 21:47:28 +03:00
RoosterDragon
f4af5c1764 Fix CA1852 2023-06-06 11:51:47 +03:00
RoosterDragon
277699cbd5 Fix CA1822 2023-06-06 11:51:47 +03:00
Matthias Mailänder
1c2ce0dcc0 Deprecate string format log shorthand. 2023-05-05 19:03:09 +02:00
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
RoosterDragon
062dc2bd40 Fix SA1141 2023-04-08 16:51:51 +03:00
RoosterDragon
8a285f9b19 Fix IDE0090 2023-04-08 16:51:51 +03:00
RoosterDragon
dc40442118 Fix doc comment on CanKickClient. 2023-03-27 20:55:44 +02:00
Gustas
bf00577d33 Allow kicking dead players 2023-03-27 20:15:17 +02:00
RoosterDragon
939f715e3c Fix IDE0053 2023-03-07 13:18:13 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
RoosterDragon
837c70f857 Fix IDE0061 2023-02-24 22:00:25 +02:00
Paul Chote
947f53a991 Disable max order length check for local servers. 2023-02-14 10:15:21 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Ivaylo Draganov
a0f17b15ec Refactor translation files
- Add prefixes to all message keys to provide context
- Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus)
- Rename some class fields for consistency with translation keys
2022-12-19 22:04:54 +13:00
Matthias Mailänder
760a1245c5 Mark non-moddable translation strings as constant. 2022-12-07 18:40:26 +02:00
abcdefg30
c664af4fe2 Seal the Server.Connection class
Solves CA1816
2022-10-31 12:19:34 +01:00
abcdefg30
a00348dac1 Dispose all connections when shutting down a server 2022-10-31 12:19:34 +01:00
tomas
7b7ccf4128 Fix crash in OrderBuffer 2022-09-26 22:44:13 +03:00
Matthias Mailänder
d3a8b07f05 Remove unread private member (IDE0052) 2022-09-13 10:36:57 +03:00
penev92
216029dc27 Fix a crash with BlockingCollection in Connection
The BlockingCollection would have `IsAddingCompleted` to true, but `IsComplete` to false, slipping through the cracks and causing an InvalidOperationException ("The collection has been marked as complete with regards to additions.") when trying to add to it.
We now add a check on `(Try)SendData` to only try to add if we can. The collection is still viable for reading until empty/`IsComplete`.
2022-09-04 13:04:17 +03:00
Matthias Mailänder
0b67b5bfae Extract translation strings. 2022-09-02 14:41:24 +03:00
Gustas
58fcffa429 Add anti-flood protection 2022-08-20 10:24:25 +02:00
teinarss
999af0c05b Add OrderBuffer and time synchronisation. 2022-07-26 15:09:08 +03:00
Matthias Mailänder
834de4efbe Port to Linguini 2022-07-02 22:32:37 +01:00
abcdefg30
d1f7fb8fb8 Serialize the actor generation for network orders 2022-06-25 18:18:49 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00