Page MenuHomeFeedback Tracker

[Feature Request] Multiplayer Server Commands with reason
Feedback, NormalPublic

Description

Ref: https://community.bistudio.com/wiki/Multiplayer_Server_Commands

Currently it is not possible to ban or kick someone with a reason using the multiplayer server commands, so it would be cool to be able to add a reason.

Example:

#exec ban <any player identifier> <reason>
#exec kick <any player identifier> <reason>

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

dedmen set Ref Ticket to AIII-56422.May 21 2024, 9:50 AM
dedmen added a subscriber: dedmen.May 21 2024, 12:16 PM

Mh..
Kick already has a reason. Its just not documented on wiki.

#kick user reason

The text after the first whitespace after the userid, is the kick reason.

Weird thing here, we don't handle quotes for the player nickname.
The first space character ends the name/id part.

But the function that the name is passed to, to find the actual player, does handle quotes.

#kick 3 testkickreason

I love archeology.

Passing kick and ban reason was added in 1.94 in mid 2019.
This was however not included in the changelog (even though the programmer flagged it to be included) and also never documented on wiki.

#kick parameter1 parameter2
and
#exec ban "parameter1 parameter2"

exec really just executes a SQF script. The ban command takes a number or a string. So if you want to pass more than a number, you gotta pass a string, including the quotes.

The ban command also splits the string on the first whitespace. Meaning, playernames with a whitespace in it are not possible.

As a bonus though.
The ban reason is never displayed to the client getting banned.

For kick you have
"You were kicked off the game. (kick reason)"
And for BattlEye kicks you have
"You were kicked off the game. (BattlEye: kick reason)"

This feature was added in 2010, but it was not implemented for bans.
So while the banned client actually receives the reason for the ban, it never displays it in the UI. That will be fixed with 2.18

2.18 ban also displays the message

dedmen changed the task status from New to Feedback.EditedMay 21 2024, 4:21 PM

With 2.18 the kick/ban commands support quotes and whitespace inside it.
if not using quotes, it will split at whitespace

#kick "user name" ban reason text
#kick "user name" "ban reason text"
#exec ban """user name""" ban reason text" // Its SQF script, so quotes need to be escaped by double quoting
#exec ban """user name""" ""ban reason text"""