Page MenuHomeFeedback Tracker

Feature Request: Add a new "AddBan" function for appending lines to ban.txt file
Assigned, UrgentPublic

Description

Per T146873 and T148592, it is currently impossible for scripts to append/write to the ban.txt file. This limits the ability for server administrators to perform their responsibilities, as it means that the admins must have separate access to the host's filesystem in order to manage player bans. Server owners may not want to provide their admins with direct access to the server filesystem and would prefer that their admins manage bans inside the game via admin tool mods, like Community-Online-Tools or VPPAdminTools, etc.

I propose that a new native function be added to the game, called AddBan, which can be called to append new ban lines to the ban.txt file.

proto native void AddBan(string id, string comment);

Example usage:

AddBan("csQcmQ2TcCSQIiMsngK1wUmGC8yCtszKf19EMfUwAiw=", "Used racial slurs in VOIP on 2022-08-13");

The resulting line appended to the ban.txt file:

csQcmQ2TcCSQIiMsngK1wUmGC8yCtszKf19EMfUwAiw=    //Used racial slurs in VOIP on 2022-08-13

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Additional Information

Note: Some admin tool mods implement "player bans" by disconnecting players after they fully connect to the server. This solution is suboptimal since it allows the banned players to fully connect to the server before being disconnected, wasting server resources. It is better to ban players via the built-in ban.txt-based method.

Event Timeline

tjensen created this task.Aug 13 2022, 3:51 PM
Geez changed the task status from New to Assigned.Aug 23 2022, 11:39 PM
sileed added a subscriber: sileed.Mar 11 2023, 2:13 AM