Commit graph

19767 commits

Author SHA1 Message Date
toaster
1667b050b2 Complete BANFORMAT header implementation.
* Warn the user when an incompatible ban.txt is being loaded, and stop early.
* Don't inexplicably assign as a boolean, you bafooligan!
2022-08-24 21:58:25 +01:00
toaster
34cb5192a7 Fix an issue where if the last line of an M_StartMessage was the longest, the box width wouldn't account for it. 2022-08-24 21:58:03 +01:00
toaster
a798c43028 First commit with actual human testing involved.
* Fix some bugs.
    * Reset bannode information properly, fixing being unable to join your own server.
    * Write to the buffer before saving the kick/ban reason, rather than after.
* Improve the print output for the `showbanlist` command.
    * Includes username.
    * Includes remaining time as seen by a kicked joiner.
    * Hides expired bans.
* Improve the messages for ban/kick related refused joins.
    * Replace the Reason with the actual admin-provided reason for refused connection.
    * Replace the "Server refuses connection" header with "You have been [banned/temporarily kicked] from the server", the previous given Reason.
    * Fudge the time reported for temporary kicks so that a user is encouraged to return slightly after their tempkick ends, rather than before.
* Add an extra newline to the M_StartMessage for being kicked/banned with a reason provided.

# Conflicts:
#	src/d_clisrv.c
2022-08-24 21:56:48 +01:00
toaster
f728f164f5 Create a single struct for bannednode and bannednodetimelft, and use the matching ban ID inside that struct.
While this commit does not increase the visibility of ban reasons, it makes this possible later.
2022-08-24 21:53:49 +01:00
toaster
e4e2550592 Enforce MAX_REASONLENGTH when reading ban.txt. 2022-08-24 21:53:18 +01:00
toaster
4ad6220f3e Core 1.4 specific changes.
* Ensure it can compile.
    * Removing vanilla 2.2 properties that slipped in to previous commits.
    * Rearranging i_tcp.c to avoid implicit declaration.
    * Complete rename of `IsNameGood` to `EnsurePlayerNameIsGood`.
* Add "BANFORMAT" header, for versioning support.
* Add conversion from 1.3-and-earlier format to new system.
* Don't ban the entire internet - convert zero-masks to the most specific ones.

# Conflicts:
#	src/d_netcmd.c
#	src/i_tcp.c
2022-08-24 21:52:49 +01:00
James R
a477182ea7 Draw PINGD before delay number 2022-08-24 21:43:21 +01:00
James R
795aa4b73f Ping counter: change patch name PINGF to PINGD
# Conflicts:
#	src/config.h.in
#	src/hu_stuff.c
2022-08-24 21:43:04 +01:00
James R
2ec2873b3e Fix compiler warnings 2022-08-24 21:07:42 +01:00
Sally Coolatta
281004bb85 date-time todo comment 2022-08-24 21:07:42 +01:00
Sally Coolatta
d6e2410cbb Ban improvements
- Save a note of the username, not just the reason.
- Allow setting a mask with the `banip` command.
- Make ban.txt's formatting a lot more sane. Username and reason are stored in quotes. The mask uses the same formatting as actual CDIR.
- Keep track of if we tried to load ban.txt. If it wasn't, then don't save over it with a blank file.
- Disallow quotes in player names, as it makes player name detection in console more annoying, and saving username in files scary.
2022-08-24 21:07:42 +01:00
Sally Coolatta
eb7e84b961 Automate commands
- `automate_set <event name> <command>` to set a command to run each time an event triggers.
- Currently implemented events are "roundstart", "intermissionstart", and "votestart", all of the ones from HOSTMOD.
- Turn `automate` off to disable this feature entirely. Because of the new safer way this is implemented (in HOSTMOD, this just calls some console aliases), this is turned on by default instead of off.
- This is set up in a way to facilitate adding more automation events very easily, if desired.
2022-08-24 21:07:41 +01:00
Sally Coolatta
0308ab6bd4 Scheduling commands
- `schedule_add <seconds> <command>` to add a command that runs on a recurring timer.
- `schedule_list` to print out all of the scheduled tasks.
- NEW: `schedule_clear` to revert the schedule to a blank slate.
- `schedule` cvar determines whenever or not to run the scheduled tasks. Unlike HOSTMOD, turning this off will reset the timers of the tasks, instead of freezing them.
- I did not implement HOSTMOD's ability to pick from several random command per scheduled task. Would drastically increase the code complexity when you can just use a choose command in your schedule_add for the exact same effect.
2022-08-24 21:07:41 +01:00
Sally Coolatta
d2a0bdb044 Attempt fix for players being able to get admin
Tyron said there is an "outstanding base game bug where an authenticated player can ghost and a new player will log in on their node, inheriting admin" ... wow that's terrifying! Let's reset admin for every  instance of CL_ClearPlayer instead of only in CL_RemovePlayer.
2022-08-24 21:02:39 +01:00
Sally Coolatta
2fdd8c1e13 Implement shout commands
- shout command to create a server message, with its own special sound cue & color
- shoutname to control the nametag, by default this is "SERVER"
- shoutcolor controls the color of the message. By default it's red, but there's also a option for player colored.
- autoshout makes any message sent by a admin/server automatically turn into a shout
- Unlike HOSTMOD shout, integrated it with the dedicated server say behavior -- using say on dedicated server is always a shout.
2022-08-24 21:02:39 +01:00
Sally Coolatta
3096806f04 Kicks are now temp bans
Length is determined by the "kicktime" cvar, in minutes. By default, this is set to 10, but I'm willing to adjust this. Only applies to manual kicks (in the future, maybe also name filter kicks).

The timestamp for the unban time is even saved in ban.txt, so long-term temporary bans are completely possible. (I checked, you can attempt to ban someone for up to 1902 years if you really want to.)
2022-08-24 21:02:38 +01:00
Sally Coolatta
5ea0f69a83 - Attach ban reasons to banned_t
- Properly call D_SaveBan after remote bans. Bans are no longer saved in the ban command and instead wait for the actual kick to process, since before they were split between the two, which is what caused the discrepancy.
2022-08-24 21:02:38 +01:00
Sally Coolatta
2c604e2487 Combine banned & bannedmask into banned_t
Better code cleanliness, also makes it easier to add more data to bans later (such as a timestamp for temporary bans)
2022-08-24 21:02:38 +01:00
Sally Coolatta
e9ae1e3944 Start banned_size much smaller 2022-08-24 21:02:38 +01:00
Sally Coolatta
35b82b6dd9 Random choice commands 2022-08-24 21:02:38 +01:00
Sally Coolatta
118eb0b3dd Remove MAXBANS
Needs proper stress testing but seems to work.
2022-08-24 21:02:37 +01:00
Sally Coolatta
f571e559d4 Playsound command
For scripted global sound cues for the entire server.
2022-08-24 21:02:37 +01:00
Sally Coolatta
70c48fc0e9 Ping measured in frame delay instead of milliseconds
The part of HOSTMOD ministats that I wanted. Can go back to ms using the pingmeasurement cvar.

If Tyron wants to bring ministats fully in I think it'd be better to bring its ideas to replace the current HUD instead, ideally using the existing ping gfx, so they should bring it up with Oni
2022-08-24 21:02:37 +01:00
Sally Coolatta
113dd6a600 Map helper commands from HOSTMOD 2022-08-24 21:02:36 +01:00
Sal
57a3aef590 Merge branch 'egg-fast-drift' into 'master'
Give heavy-accel a bonus to drift boosts

See merge request KartKrew/Kart!648
2022-08-24 07:34:34 +00:00
Sally Coolatta
7f4b3e7c2a maybe fix lightning crash idk lol 2022-08-24 03:34:03 -04:00
Sally Coolatta
a4767323f2 Give heavy-accel a bonus to drift boosts 2022-08-24 01:38:50 -04:00
Sally Coolatta
0a7b437328 Fix offsets for models 2022-08-24 00:46:12 -04:00
Sal
0f61d1f064 Merge branch 'v1-rollup' into 'master'
V1 rollup

See merge request KartKrew/Kart!646
2022-08-24 03:34:32 +00:00
Sal
7f71775ae0 Merge branch 'big-boost' into 'master'
Big Boosts

See merge request KartKrew/Kart!643
2022-08-24 03:25:42 +00:00
Sally Coolatta
89367c809d Give first blood sliptiding 2022-08-23 23:12:24 -04:00
Eidolon
91a404c190 cmake: rename executable 2022-08-23 21:44:25 -05:00
Sally Coolatta
b28450313b Merge branch 'master' into big-boost 2022-08-23 22:34:14 -04:00
Eidolon
37d0857762 cmake: move debug strip to src/CMakeLists.txt 2022-08-23 21:32:29 -05:00
Sally Coolatta
eeb00dac22 Even bigger spindash speed 2022-08-23 22:29:12 -04:00
Eidolon
d3287c044d cmake: add objects CMakeLists.txt 2022-08-23 21:29:06 -05:00
Eidolon
17128dc8f7 cmake: add exchndl link on mingw32 2022-08-23 21:26:17 -05:00
Eidolon
4b059f5b38 cmake: remove win32 subdirectory 2022-08-23 21:26:09 -05:00
Eidolon
91fdf426e1 Don't sleep w/ fpscap 0 and vsync enabled 2022-08-23 21:22:40 -05:00
Eidolon
cf230b2182 cmake: build sdl target with threads support 2022-08-23 21:19:31 -05:00
Sal
dc39834953 Merge branch 'infini-tether' into 'master'
Infini tether

See merge request KartKrew/Kart!644
2022-08-24 01:47:55 +00:00
Sally Coolatta
accf8035e0 Make lightning tether bigger 2022-08-23 21:43:53 -04:00
Sally Coolatta
3678eb4868 Lightning Shield tether is stronger 2022-08-23 20:31:13 -04:00
Sally Coolatta
0141ea5a7c Infinite tether uses lightning shield effects 2022-08-23 20:27:19 -04:00
Sally Coolatta
ba8c511bb4 Make infinite tether rainbowy 2022-08-23 20:11:07 -04:00
Sally Coolatta
9a250d3808 Maintain tether in air setpieces 2022-08-23 20:09:10 -04:00
Sally Coolatta
7f8ac08ea4 Don't eat up first blood in the air
Makes it useful on City Escape. The visual effect ends early in the air, but oh well.
2022-08-23 19:56:37 -04:00
Sally Coolatta
fa69737a33 Double first blood power 2022-08-23 19:49:24 -04:00
Sally Coolatta
841c6b9e76 Increase spindash power 2022-08-23 19:28:07 -04:00
Sal
0d3c5ed880 Merge branch 'less-quad-orbis' into 'master'
Adjusted item odds

See merge request KartKrew/Kart!642
2022-08-23 07:49:40 +00:00