Clientpermissions.xml: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(Created page with "<samp>'''clientpermissions.xml'''</samp> is a file that stores permissions and allowed console commands of every client connected to the server. It is located in <sam...")
 
m (5 revisions imported)
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
It is located in <samp>Barotrauma/Data</samp>.
It is located in <samp>Barotrauma/Data</samp>.


==clientpermissions.xml==
==Default==
Default settings for new game installs.
Default file contents for new game installs.
<pre>
<pre>
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
Line 10: Line 10:
</ClientPermissions>
</ClientPermissions>
</pre>
</pre>
==Syntax==
==Syntax==
While permissions are usually given with [[ranks]] or in-game commands, they can also be given by manually editing the clientpermissions file.
While permissions are usually given with [[ranks]] or in-game commands, they can also be given by manually editing the clientpermissions file.
Line 39: Line 40:
</ClientPermissions>
</ClientPermissions>
</pre>
</pre>
===Example for Dedicated Servers===
This example gives the player "Mike", with the Network IP of "127.0.0.1" the ManageCampaign permission.
<pre>
<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions>
  <Client
    name="Mike"
    endpoint="127.0.0.1"
    permissions="ManageCampaign" />
</ClientPermissions>
</pre>
==Dedicated Servers==
'''Note:''' Dedicated servers use Lidgren networking, and not the SteamP2P library, as such they will not see Steam IDs.
[[Category:Server Files]]
[[Category:Server Files]]

Latest revision as of 19:38, 12 November 2020

clientpermissions.xml is a file that stores permissions and allowed console commands of every client connected to the server.

It is located in Barotrauma/Data.

Default

Default file contents for new game installs.

<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions>  
</ClientPermissions>

Syntax

While permissions are usually given with ranks or in-game commands, they can also be given by manually editing the clientpermissions file.

The following code is the syntax for a single client entry:

<Client
    name="<player name>"
    steamid="<steamid>"
    permissions="<permission(s)>">
    <command
      name="<commandname>" />
  </Client>

Example

This example gives the player "John", with the Steam ID of "123456789", server log and console command permissions, along with the heal and spawn command.

<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions> 
<Client
    name="John"
    steamid="123456789"
    permissions="ServerLog, ConsoleCommands">
    <command
      name="heal" />
    <command
      name="spawn" />
  </Client>
</ClientPermissions>

Example for Dedicated Servers

This example gives the player "Mike", with the Network IP of "127.0.0.1" the ManageCampaign permission.

<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions> 
  <Client
    name="Mike"
    endpoint="127.0.0.1"
    permissions="ManageCampaign" />
</ClientPermissions>

Dedicated Servers

Note: Dedicated servers use Lidgren networking, and not the SteamP2P library, as such they will not see Steam IDs.