Skip to content

Commit 56e64dd

Browse files
committed
3.2 release
1 parent 17c5e98 commit 56e64dd

4 files changed

Lines changed: 169 additions & 3 deletions

File tree

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const config = {
160160
prism: {
161161
theme: prismThemes.github,
162162
darkTheme: prismThemes.dracula,
163-
additionalLanguages: ["php", "cshtml", "csharp", "lua"],
163+
additionalLanguages: ["php", "cshtml", "csharp", "lua", "powershell"],
164164
},
165165
colorMode: {
166166
respectPrefersColorScheme: true,

versioned_docs/version-3/customizations/scripts/script-examples.mdx

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,128 @@ end
130130

131131
</TabItem>
132132
</Tabs>
133+
134+
## Create Global Announcement
135+
136+
This script creates a global banner announcement that auto-expires after 30 minutes.
137+
138+
<Tabs>
139+
<TabItem value="csharp" label="C#">
140+
141+
```csharp
142+
//refAssemblies: TCAdmin.SDK.dll, TCAdmin.GameHosting.SDK.dll, TCAdmin.Scripting.dll, TCAdmin.Monitor.dll
143+
using System;
144+
using System.Collections.Generic;
145+
using TCAdmin.Web.Shared.Models.Enums;
146+
using TCAdmin.SDK.Database.Entities;
147+
148+
var Globals = new TCAdmin.Scripting.Engines.Addons.CSharpGameGlobals(); // DO NOT MODIFY THIS LINE
149+
150+
var scopes = new List<AnnouncementScope> { new() { ScopeType = EAnnouncementScopeType.Global } };
151+
var announcement = new Announcement
152+
{
153+
Subject = "Maintenance",
154+
Body = "Server restart in 30 minutes",
155+
Severity = EAnnouncementSeverity.Warning,
156+
DisplayType = EAnnouncementDisplayType.Banner,
157+
DisplayBehavior = EAnnouncementDisplayBehavior.AutoExpire,
158+
IsActive = true,
159+
ExpiresAt = DateTime.UtcNow.AddMinutes(30)
160+
};
161+
await Globals.AnnouncementManager.CreateAnnouncementAsync(announcement, scopes);
162+
```
163+
164+
</TabItem>
165+
<TabItem value="python" label="Python 3">
166+
167+
```python
168+
from System import DateTime
169+
from System.Collections.Generic import List
170+
from TCAdmin.Web.Shared.Models.Enums import EAnnouncementScopeType, EAnnouncementSeverity, EAnnouncementDisplayType, EAnnouncementDisplayBehavior
171+
from TCAdmin.SDK.Database.Entities import Announcement, AnnouncementScope
172+
173+
scopes = List[AnnouncementScope]()
174+
scope = AnnouncementScope()
175+
scope.ScopeType = EAnnouncementScopeType.Global
176+
scopes.Add(scope)
177+
178+
announcement = Announcement()
179+
announcement.Subject = "Maintenance"
180+
announcement.Body = "Server restart in 30 minutes"
181+
announcement.Severity = EAnnouncementSeverity.Warning
182+
announcement.DisplayType = EAnnouncementDisplayType.Banner
183+
announcement.DisplayBehavior = EAnnouncementDisplayBehavior.AutoExpire
184+
announcement.IsActive = True
185+
announcement.ExpiresAt = DateTime.UtcNow.AddMinutes(30)
186+
187+
AnnouncementManager.CreateAnnouncementAsync(announcement, scopes).Wait()
188+
```
189+
190+
</TabItem>
191+
<TabItem value="powershell" label="PowerShell">
192+
193+
```powershell
194+
$scope = New-Object TCAdmin.SDK.Database.Entities.AnnouncementScope
195+
$scope.ScopeType = [TCAdmin.Web.Shared.Models.Enums.EAnnouncementScopeType]::Global
196+
197+
$scopes = New-Object "System.Collections.Generic.List[TCAdmin.SDK.Database.Entities.AnnouncementScope]"
198+
$scopes.Add($scope)
199+
200+
$announcement = New-Object TCAdmin.SDK.Database.Entities.Announcement
201+
$announcement.Subject = "Maintenance"
202+
$announcement.Body = "Server restart in 30 minutes"
203+
$announcement.Severity = [TCAdmin.Web.Shared.Models.Enums.EAnnouncementSeverity]::Warning
204+
$announcement.DisplayType = [TCAdmin.Web.Shared.Models.Enums.EAnnouncementDisplayType]::Banner
205+
$announcement.DisplayBehavior = [TCAdmin.Web.Shared.Models.Enums.EAnnouncementDisplayBehavior]::AutoExpire
206+
$announcement.IsActive = $true
207+
$announcement.ExpiresAt = [DateTime]::UtcNow.AddMinutes(30)
208+
209+
$AnnouncementManager.CreateAnnouncementAsync($announcement, $scopes).Wait()
210+
```
211+
212+
</TabItem>
213+
<TabItem value="javascript" label="JavaScript">
214+
215+
```javascript
216+
var scope = new TCAdmin.SDK.Database.Entities.AnnouncementScope();
217+
scope.ScopeType = 0; // EAnnouncementScopeType.Global
218+
219+
var scopes = new System.Collections.Generic.List(TCAdmin.SDK.Database.Entities.AnnouncementScope)();
220+
scopes.Add(scope);
221+
222+
var announcement = new TCAdmin.SDK.Database.Entities.Announcement();
223+
announcement.Subject = "Maintenance";
224+
announcement.Body = "Server restart in 30 minutes";
225+
announcement.Severity = 2; // EAnnouncementSeverity.Warning
226+
announcement.DisplayType = 1; // EAnnouncementDisplayType.Banner
227+
announcement.DisplayBehavior = 1; // EAnnouncementDisplayBehavior.AutoExpire
228+
announcement.IsActive = true;
229+
announcement.ExpiresAt = System.DateTime.UtcNow.AddMinutes(30);
230+
231+
AnnouncementManager.CreateAnnouncementAsync(announcement, scopes).Wait();
232+
```
233+
234+
</TabItem>
235+
<TabItem value="lua" label="Lua">
236+
237+
```lua
238+
local scope = TCAdmin.SDK.Database.Entities.AnnouncementScope()
239+
scope.ScopeType = 0 -- EAnnouncementScopeType.Global
240+
241+
local scopes = System.Collections.Generic.List(TCAdmin.SDK.Database.Entities.AnnouncementScope)()
242+
scopes:Add(scope)
243+
244+
local announcement = TCAdmin.SDK.Database.Entities.Announcement()
245+
announcement.Subject = "Maintenance"
246+
announcement.Body = "Server restart in 30 minutes"
247+
announcement.Severity = 2 -- EAnnouncementSeverity.Warning
248+
announcement.DisplayType = 1 -- EAnnouncementDisplayType.Banner
249+
announcement.DisplayBehavior = 1 -- EAnnouncementDisplayBehavior.AutoExpire
250+
announcement.IsActive = true
251+
announcement.ExpiresAt = System.DateTime.UtcNow:AddMinutes(30)
252+
253+
AnnouncementManager:CreateAnnouncementAsync(announcement, scopes):Wait()
254+
```
255+
256+
</TabItem>
257+
</Tabs>

versioned_docs/version-3/customizations/scripts/script-objects.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ TCAdmin supports the following scripting engines:
1414
- **C#**
1515
- **JavaScript** (Jint)
1616
- **Python 3** (IronPython)
17+
- **Lua**
1718
- **PowerShell**
1819
- **Batch** (shell commands)
1920

@@ -40,9 +41,9 @@ var service = Globals.ThisService;
4041
Globals.ScriptConsole.WriteLine($"Service: {service.Name}");
4142
```
4243

43-
### JavaScript and Python Scripts
44+
### JavaScript, Python, Lua, and PowerShell Scripts
4445

45-
The same objects listed below are available as global variables in JavaScript and Python scripts. To see which objects are available, refer to the properties of `CSharpGameGlobals` and `CSharpDockerGlobals` below — the same properties are exposed in all scripting engines.
46+
The same objects listed below are available as global variables in all scripting engines. To see which objects are available, refer to the properties of `CSharpGameGlobals` and `CSharpDockerGlobals` below — the same properties are exposed in all scripting engines.
4647

4748
```javascript
4849
// JavaScript example
@@ -54,6 +55,16 @@ ScriptConsole.WriteLine("Server: " + ThisServer.Name);
5455
ScriptConsole.WriteLine("Server: " + ThisServer.Name)
5556
```
5657

58+
```lua
59+
-- Lua example
60+
ScriptConsole:WriteLine("Server: " .. ThisServer.Name)
61+
```
62+
63+
```powershell
64+
# PowerShell example
65+
$ScriptConsole.WriteLine("Server: " + $ThisServer.Name)
66+
```
67+
5768
---
5869

5970
## Common Objects
@@ -88,6 +99,7 @@ Managers provide database access to query and manage TCAdmin entities.
8899
| `ServiceManagerService` | `IServiceManagerService` | Service management operations (start, stop, restart, etc.). |
89100
| `RecurringTaskManager` | `RecurringTaskManager` | Query and manage recurring/scheduled tasks. |
90101
| `TCATaskManager` | `TCATaskManager` | Query and manage tasks. |
102+
| `AnnouncementManager` | `AnnouncementManager` | Query and manage announcements. |
91103

92104
### Utility Objects
93105

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
sidebar_label: 3.2.34.21134
3+
date: 2026-03-30
4+
authors: [tcadmin]
5+
---
6+
7+
# Version 3.2.34.21134
8+
9+
### New Features
10+
11+
- **Service backup and restore** — Added a full backup and restore system for game and Docker services. Supports multiple storage providers including local, FTP, SFTP, and S3. Backup configuration can be set per game or Docker blueprint, with configurable backup limits and retention. Includes a file browser for restoring individual files from backups.
12+
- **Announcements** — Admins can create targeted announcements (banner, snackbar, or dialog) with flexible scoping (global, per-user, per-role, per-service, per-blueprint, per-region, per-datacenter). Announcements support severity levels, custom icons, Markdown body, acknowledgment tracking, and real-time delivery. Includes a "Show at login page" behavior for pre-authentication announcements. An `AnnouncementManager` script object is also available for creating and managing announcements programmatically via scripts.
13+
- **File manager upload/download persistence** — File uploads and downloads now persist when leaving the file manager, so transfers continue in the background.
14+
- **Scripting improvements** — The script editor now provides autocomplete suggestions and real-time syntax checking for all supported languages.
15+
- **Billing API wait parameters** — Added `waitUntilComplete` and `waitSeconds` parameters to billing API functions, allowing external billing systems to wait for task completion before returning a response.
16+
- **Role and permission improvements** — Added a game developer role with appropriate access to game service and Docker service endpoints. Expanded API key permissions to cover game service and Docker service blueprint features. Users with the appropriate role can now access service settings, with a warning that the user must also own the server.
17+
- **Automatic timezone detection** — User timezone is now set automatically if not specified during creation.
18+
- **Monitor console timestamps** — Added timestamps to monitor console log output for easier debugging.
19+
- **Reorganized server settings page** — The server settings page has been reorganized for improved usability.
20+
21+
### Bug Fixes
22+
23+
- **User validation** — Users can no longer be created with duplicate usernames or email addresses. Fixed timezone validation when creating or updating users.
24+
- **File manager context menu** — Fixed the context menu not working correctly in the service file manager.
25+
- **Task status dialog** — Fixed the task status dialog not updating correctly during task execution.
26+
- **Database updates failing** — Fixed a bug that caused database updates to fail.
27+
- **ServerHardwareInfo permissions** — Fixed missing permissions for accessing server hardware information on game service and Docker service endpoints.
28+
- **Service port in grid mode** — Fixed the port column displaying incorrect values in the service list grid and card views. The port now correctly shows the service's designated display port instead of the first entry from the ports dictionary.
29+
- **System health page** — Fixed version mismatch warning in the footer caused by inconsistent version format comparison, improved license information display, and updated version number formatting for consistency.

0 commit comments

Comments
 (0)