Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004153Zandronum[All Projects] Suggestionpublic2023-08-11 06:572024-03-23 06:25
ReporterFused 
Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.1 
Target Version3.2Fixed in Version3.2 
Summary0004153: Provide a way to apply (mild) timed bans on players through ACS
DescriptionAs per the conversation I had yesterday, a big feature I personally look for is the ability to punish players that sabotage mods by allowing the game to apply temporary bans to these players when it notices certain players misbehaving in a match.
This is especially useful in competitive game modes, such as Zombie Horde which could benefit from this by punishing players who spectate as a Zombie after being chosen/infected into one.

I noticed that there was a lot of positive and negative feedback to this, and the biggest drawback I heard of this is that the ability to permanently ban players through ACS is too much power for a mod to have. I agree, and therefore my suggestion is to introduce a milder form which only allows timed bans of up to half an hour, or less if desired. Personally I am seeking a minimum of 10 minutes as was done back in the day with Grandvoid, which was very effective.

I understand the severity of these type of functions and the fact that they are prone to abuse in one way or another, but I have to admit that I see little reason to draw the bar here when there are so many existing ACS methods that could "alter" the player's state (think of soft muting players with the chat ACS script, or recursively forcing players to spectate with ACS using `kickfromgame`).
Additional InformationRelated:
'https://zandronum.com/tracker/view.php?id=2554 [^]'
Attached Filespatch file icon BanFromGame.patch [^] (3,709 bytes) 2024-01-24 21:52 [Show Content]
patch file icon BanFromGame_2.patch [^] (3,104 bytes) 2024-01-25 16:24 [Show Content]
patch file icon BanFromGame_3.patch [^] (3,105 bytes) 2024-01-28 22:00 [Show Content]

- Relationships
related to 0002554closed New ACS functions for server administration 

-  Notes
User avatar (0023001)
BinaryCode (reporter)
2024-01-24 21:52

I have uploaded a .patch file that adds BanFromGame(PlayerNumber, Time[, Duration]), which should work as described here, as well as a CVar (sv_allowacsbanfunction) to disable the functionality as needed by server hosts.

If the CVar is off, the function will not work, and the time (in minutes) can only go up to 60, or an hour.
User avatar (0023006)
Kaminsky (developer)
2024-01-25 16:06
edited on: 2024-01-25 16:08

A few comments on your patch:

1. It would be better to define "sv_allowacsbanfunction" inside "p_acs.cpp", rather than defining it in "c_cmds.cpp" (not an appropriate place to put it in) and then adding an extern in the only file that you need to use it in. I also recommend putting its definition above:

//
// [TP] Overridable system time property
//
CVAR( Int, acstimestamp, 0, CVAR_ARCHIVE | CVAR_NOSETBYACS )

2. You should move "#include "sv_ban.h"" (without the comment) underneath all the extra includes listed under "// [BB] New #includes."

3. You should also move "case ACSF_BanFromGame:" underneath "case ACSF_LumpClose:" to follow proper case ordering.

4. You can ditch both instances of "else return 0;" and replace the "break;" statement at the end of the case block with "return 0;". The function is guaranteed to return 1 if all conditions are true and will hit to the end of the case block anyways if they aren't.

User avatar (0023007)
BinaryCode (reporter)
2024-01-25 16:27

I have uploaded an updated patch that addresses those issues.
User avatar (0023024)
Kaminsky (developer)
2024-01-28 21:51

Another point that I didn't bring up earlier: from a previous discussion, we agreed that banning players via ACS should be an opt-in system for security reasons. Therefore, the default value of "sv_allowacsbanfunction" needs to be changed to false.
User avatar (0023025)
BinaryCode (reporter)
2024-01-28 22:00

Uploaded another patch that sets it to false by default.
User avatar (0023026)
Torr Samaho (administrator)
2024-01-28 22:08

Thanks! I rebased the updated patch to the current head of our repo and added it.
User avatar (0023089)
Trillster (reporter)
2024-02-26 01:03

I think rather than a boolean `sv_allowacsbanfunction` CVAR, it would be preferable to have a `sv_maxacsbanduration` CVAR with a default of 0.

This would allow server hosts the ability to clamp any mod-supplied ban durations to a lower amount than the current hard-coded internal value if desired. It would also allow mods to specify longer spanning bans that will only see action if the server host opts into a longer duration via CVAR.
User avatar (0023252)
Kaminsky (developer)
2024-03-02 15:54

In response to the feedback above, I created a new MR to replace the "sv_allowacsbanfunction" CVar with "sv_maxacsbanduration":'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/37 [^]'
User avatar (0023291)
Kaminsky (developer)
2024-03-03 13:44

The aforementioned changes have been pushed into the default branch of our repository:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/f15955f77fdfcdfd230348bb405b1c8df8004bb1 [^]'
User avatar (0023473)
Ru5tK1ng (updater)
2024-03-23 06:25

Tested the latest build of 3.2 and the ban function seemed to work fine. Considering I don't have a means to mass test this, reopen the ticket if necessary.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2023-08-11 06:57 Fused New Issue
2023-08-11 08:52 Kaminsky Relationship added related to 0002554
2023-08-11 08:54 Kaminsky Product Version 4.0-beta => 3.1
2024-01-24 21:52 BinaryCode File Added: BanFromGame.patch
2024-01-24 21:52 BinaryCode Note Added: 0023001
2024-01-25 16:06 Kaminsky Note Added: 0023006
2024-01-25 16:06 Kaminsky Status new => needs review
2024-01-25 16:06 Kaminsky Target Version => 3.2
2024-01-25 16:07 Kaminsky Note Edited: 0023006 View Revisions
2024-01-25 16:08 Kaminsky Note Edited: 0023006 View Revisions
2024-01-25 16:24 BinaryCode File Added: BanFromGame_2.patch
2024-01-25 16:27 BinaryCode Note Added: 0023007
2024-01-28 21:51 Kaminsky Note Added: 0023024
2024-01-28 22:00 BinaryCode File Added: BanFromGame_3.patch
2024-01-28 22:00 BinaryCode Note Added: 0023025
2024-01-28 22:08 Torr Samaho Note Added: 0023026
2024-01-28 22:08 Torr Samaho Status needs review => needs testing
2024-02-26 01:03 Trillster Note Added: 0023089
2024-03-02 15:54 Kaminsky Note Added: 0023252
2024-03-02 15:54 Kaminsky Status needs testing => needs review
2024-03-03 13:44 Kaminsky Note Added: 0023291
2024-03-03 13:44 Kaminsky Status needs review => needs testing
2024-03-23 06:25 Ru5tK1ng Note Added: 0023473
2024-03-23 06:25 Ru5tK1ng Fixed in Version => 3.2
2024-03-23 06:25 Ru5tK1ng Status needs testing => resolved
2024-03-23 06:25 Ru5tK1ng Resolution open => fixed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker