ServerConfig
Configuration of the parameters of an instance by privileged users.
The ServerConfig message allows privileged users to modify the configuration parameters of an instance in real time.
It manages the performance, the capacity, the security and the behaviors of the instance.
Priority
Normal - This message has a normal priority because it does not directly affect connectivity.
The ServerConfig message requires high privileges. Only instance owners and master moderators can modify the configuration.
Client → Server Request
Payload Format
[instance_id: byte]
[config_flags: byte]
(Tps ? [tps: byte])
(Threshold ? [threshold: float])
(Capacity ? [capacity: ushort])
(Password ? [password: string])
(Flags ? [instance_flags: uint])Detailed Structure
| Type | Name | Description |
|---|---|---|
| byte | InstanceID | ID of the instance to configure |
| byte | ConfigFlags | Flags indicating which parameters to modify |
| byte | TPS | New refresh rate (conditional) |
| float | Threshold | New latency threshold (conditional) |
| ushort | Capacity | New maximum capacity (conditional) |
| string | Password | New password (conditional) |
| uint | InstanceFlags | New instance flags (conditional) |
Server Config Flags
| Value | Name | Description |
|---|---|---|
| 0x00 | None | Request for the current configuration |
| 0x01 | Tps | Modify the refresh rate |
| 0x02 | Threshold | Modify the latency threshold |
| 0x04 | Capacity | Modify the maximum capacity |
| 0x08 | Password | Modify the password |
| 0x10 | Flags | Modify the instance flags |
Common Combinations
| Value | Name | Description |
|---|---|---|
| 0x03 | Performance | TPS + Threshold |
| 0x05 | Basic | TPS + Capacity |
| 0x18 | Security | Password + Flags |
| 0x1F | All | All the parameters |
Instance Flags
| Value | Name | Description |
|---|---|---|
| 0x01 | IsPublic | Instance publicly visible |
| 0x02 | UsePassword | Password protection required |
| 0x04 | UseWhitelist | Only authorized users can join |
| 0x08 | AuthorizeBot | Allows bot connections |
| 0x10 | AllowOverload | Allows exceeding the maximum capacity |
Request Example - Query
[0x05] // InstanceID = 5
[0x00] // ConfigFlags = None (info request)Request Example - Modify TPS
[0x05] // InstanceID = 5
[0x01] // ConfigFlags = Tps
[0x3C] // TPS = 60Request Example - Modify Performance
[0x03] // InstanceID = 3
[0x03] // ConfigFlags = Performance (Tps | Threshold)
[0x1E] // TPS = 30
[0x42, 0x48, 0x00, 0x00] // Threshold = 0.001fRequest Example - Full Security
[0x01] // InstanceID = 1
[0x18] // ConfigFlags = Security (Password | Flags)
[0x0A, "secret123"] // Password = "secret123"
[0x00, 0x00, 0x00, 0x07] // InstanceFlags = IsPublic | UsePassword | UseWhitelistServer → Client Response
Payload Format
[instance_id: byte]
[result: byte]
(result in [Change, Success] ? (
[config_flags: byte]
(Tps in config_flags ? [tps: byte])
(Threshold in config_flags ? [threshold: float])
(Capacity in config_flags ? [capacity: ushort])
(Password in config_flags ? [has_password: byte])
(Flags in config_flags ? [instance_flags: uint])
))
(Failure == result ? [reason?: string])Detailed Structure
| Type | Name | Description |
|---|---|---|
| byte | InstanceID | ID of the instance concerned |
| byte | Result | Result code of the operation |
| byte | ConfigFlags | Flags of the parameters included in the response |
| byte | TPS | Current/custom refresh rate |
| float | Threshold | Current/custom latency threshold |
| ushort | Capacity | Maximum capacity of the instance |
| byte | HasPassword | Indicates whether a password is configured (1/0) |
| uint | InstanceFlags | Current instance flags |
| string | Reason | Reason for the failure (if applicable) |
Server Config Results
| Value | Name | Description |
|---|---|---|
| 0x00 | Success | Configuration updated successfully |
| 0x01 | Failure | Update failed |
| 0x02 | Change | Configuration change notification |
Response Example - Success
[0x05] // InstanceID = 5
[0x00] // Result = Success
[0x01] // ConfigFlags = Tps
[0x3C] // TPS = 60Response Example - Full Configuration
[0x03] // InstanceID = 3
[0x02] // Result = Change
[0x1F] // ConfigFlags = All
[0x3C] // TPS = 60
[0x42, 0x48, 0x00, 0x00] // Threshold = 0.0001f
[0x00, 0x20] // Capacity = 32
[0x01] // HasPassword = true
[0x00, 0x00, 0x00, 0x03] // InstanceFlags = IsPublic | UsePasswordResponse Example - Failure
[0x05] // InstanceID = 5
[0x01] // Result = Failure
[0x11, "Permission denied"] // Reason = "Permission denied"Processing
Server Side
- Instance validation: Check that the instance exists
- Presence validation: Ensure that the client is in the instance
- Privilege check: Verification of the
HasHighPrivilegerights - Flag processing: Application of the modifications according to the flags
- Data validation: Check of the parameter consistency
- Broadcast: Sending of the notifications to the other players
- Response: Confirmation to the initiating client
Client Side
- Data preparation: Assembly of the parameters to modify
- Conditional sending: Inclusion of the modified data only
- Response processing: Update of the interface according to the result
- Notification handling: Reception of the changes from other players
Special Behaviors
Configuration Query
If ConfigFlags = None, the server returns the current configuration of the instance with the All flag.
Custom Parameters
Players may have custom parameters (TPS/Threshold) that take priority over the instance ones.
Automatic Broadcast
Any modification is automatically broadcast to all the players of the instance via the Change type.
Password Protection
The password is never returned in the responses, only a HasPassword indicator.
Permission Validation
Required Privileges
Only players with HasHighPrivilege can modify the configuration:
InstanceOwner: Owner of the instanceMasterModerator: Master moderator
Automatic Rejection
Modification attempts without the appropriate privileges return Failure with "Permission denied".
Automatic Notifications
Change Notifications
When a parameter is modified, all the other players of the instance receive a ServerConfig message with:
Result = ChangeConfigFlagsindicating the modified parameters- New parameter values
Notification Example
If a player modifies the TPS, all the others receive:
[0x05] // InstanceID = 5
[0x02] // Result = Change
[0x01] // ConfigFlags = Tps
[0x3C] // TPS = 60Integration with Other Messages
Relation with Enter
The Enter response includes the current TPS and Threshold parameters of the instance.
Relation with Instance Flags
Flag modifications directly affect the Enter behavior:
UsePassword: Enabling/disabling the protectionUseWhitelist: Whitelist access controlAuthorizeBot: Permission for bot connections
Error Handling
Instance Errors
- "Instance not found": The specified instance does not exist
- "You are not in instance": The client is not in the instance
Permission Errors
- "Permission denied": Insufficient privileges to modify the configuration
Data Errors
- "No valid configuration flags provided": No valid flag provided in the request
Usage Examples
Administration Interface
"Instance TPS updated to 60"
"Instance capacity changed to 32 players"
"Password protection enabled"
"Bot connections now allowed"Performance Optimization
Moderators can adjust in real time:
- TPS for network performance
- Threshold for latency tolerance
- Capacity according to activity
Security Management
Dynamic configuration of:
- Temporary passwords
- Whitelists according to events
- Protection against malicious bots