This sets some reasonable defaults for all files.
Adds settings for *.sh files, doubles as configuration for shfmt.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.
As for choosing tabs over spaces, some arguments are:
- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This removes the executable bits from files which aren't supposed to
have them.
Also removes shebangs for files which aren't supposed to be executable.
In the ruff config file added in #6954 explicitly selecting the ruff
rules to check was missed, resulting in ruff only checking a very small
subset of its available rules. That hasn't been desired, so this is the
first of a series of commits enabling more rules. In this PR all rules
whose violations can be either automatically fixed by ruff or are
trivial to fix manually get enabled. For the follow up PRs it's intended
to focus on one area of rules per PR to gradually improve the Python
code quality.
This updates CODEOWNERS to remove owners for the lobby bot code, which
isn't included in this repository anymore. It also adds me for some
areas where I can help with PR reviews.
This replaces the existing arclint linter to ensure the project name
does only include a non-breaking space with a pre-commit hook. The regex
to check is slightly different to account for escaped non-breaking
spaces in JavaScript files and to avoid some false-positives.
When running clang-format which reorders headers, those are the ones
that came up as missing.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Getting and building libraries is now clearly separated from preparing
workspaces.
Some disk space is automatically reclaimed and cleanup is streamlined.
Up to now Pyrogenesis didn't check if lobby related XMPP stanzas were
sent by the lobby bots. This meant that every user could send forged
data, like the list of games, to be displayed by another user. This
change fixes that by checking such stanzas come from the expected lobby
bots.
Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5216
This was SVN commit r28197.
72f0fdb41b broke the deferred sending of XMPP stanzas for changes to the
game settings during game setup. This change fixes it and decreases the
interval to send game setting updates from 2000ms to 500ms to have
updates faster visible in the multiplayer lobby.
One reason why this bug might have been gone unnoticed so far is that
the traffic shaping employed by ejabberd results in a similar behavior
when just looking at the multiplayer lobby through Pyrogenesis:
After exhausting a certain amount of traffic, clients are only allowed
to send a defined amount of bytes per second. This results in game
setting changes taking a moment before they show up in the multiplayer
lobby. Contrary to the desired behavior, this however leads to all
updates being received and processed by XpartaMuPP resulting in
unnecessary load on the server. With this fix Pyrogenesis doesn't
trigger the traffic shaping on ejabberd side anymore, as there is now
much less traffic being sent by Pyrogenesis.
Patch by: @Dunedan
Accepted by: @StanFixes: #6740
Differential Revision: https://code.wildfiregames.com/D5217
This was SVN commit r28196.