Commit graph

1108 commits

Author SHA1 Message Date
xuyuwtu
75c8a8ced4 Use better code 2026-01-29 13:50:09 +08:00
Cai
bd28c5548b
remove annoying dead check 2026-01-28 23:32:54 +08:00
Cai
785e41bd0f
sync 2026-01-28 19:28:39 +08:00
Cai
9eb49b0447
sync 2026-01-28 14:13:30 +08:00
Cai
593f510149
chore: use local OTA lib 2026-01-27 19:37:46 +08:00
Chris
6948855a4b
Merge branch 'general-devel' into chore-noshow-kick-message 2026-01-18 15:35:58 +10:30
Cai
0cc0f7733a
fix: allow evil grass to grow during world generation even when Allow...Creep is false 2025-09-26 23:28:00 +08:00
Cai
7c41775d6d
chore: silent kick on invalid client connection 2025-09-17 21:36:30 +08:00
Sakura Isayeki
924fa983f6
Merge branch 'general-devel' into feature/database 2025-05-10 03:23:29 +02:00
Luke
df05e94226 Merge remote-tracking branch 'upstream/general-devel' into net9-upgrade 2025-05-09 22:38:33 +10:00
Sakura Isayeki
f59095c848
Merge branch 'general-devel' into feature/database 2025-05-09 12:10:38 +02:00
Lucas Nicodemus
952a6685b1
Version tick: 5.2.4 2025-05-09 16:28:53 +09:00
BuildTools
bd2aafe01a Fix console title not updating and world not saving when the last player disconnects 2025-05-07 15:25:49 +02:00
Sakura Akeno Isayeki
0021f9884d
refactor(server/db): Move database connection logic to separate class
Implements a DbBuilder class to streamline the creation of database connections for both SQLite and MySQL storage types.

Enhances error handling for database setup and ensures that necessary directories are created dynamically based on configuration settings.

This refactor improves code maintainability and readability, consolidating connection logic into a dedicated builder class.
2025-04-21 14:04:27 +02:00
Lucas Nicodemus
29477ab305
Update version codename 2025-03-15 17:33:04 +09:00
Lucas Nicodemus
db9c47d7c0
Version tick: 5.2.3 2025-03-10 01:22:38 +09:00
Lucas Nicodemus
56041f2c1a
Merge remote-tracking branch 'ghsa/handshake-final-update-fix' into general-devel 2025-03-10 01:08:28 +09:00
Joseph Goh
836cc33c8d rewrite: bed spawning for SSC 2025-02-10 11:42:36 +08:00
ohayo
5a23073db5 Suggestions + fix last missed magic number 2025-02-05 09:33:36 +10:00
ohayo
72f529fcb1 Typo fix 2025-02-04 21:24:44 +10:00
ohayo
ce04d9d173 Remove magic number + Use suggestions by particles
Added a new ClientState enum based on code in Terraria.MessageBuffer.GetData & Terraria.Netplay.InnerClientLoop
2025-02-04 21:06:40 +10:00
ohayo
52d1840003 Packet filtering for those who never finish the handshake
This also kicks those who never finish handshaking upon chat now. (To free up the resources a bit I guess?)

Before a player finishes the connection handshake, the server will check if it's necessary to send them a packet - it checks against a list of necessary packets like:

- ContinueConnecting (Send User Slot),
- PlayerSpawnSelf (CompleteConnectionAndSpawn),
- WorldInfo (Which the server does a further check if the player is at the appropriate state to be sent the world info)
- Status
- Disconnection
- TileFrameSection & TileSendSection
2025-02-04 11:07:10 +10:00
Luke
677426b746 Merge remote-tracking branch 'upstream/general-devel' into net9-upgrade 2025-02-02 16:43:59 +10:00
ohayo
b5d546a660 Remove debug logging (sorry haha) 2025-02-02 12:41:35 +10:00
ohayo
4f2fff050d Quick bug fix - forgot about respawns + only set handshake once
The connection state should NEVER be set to under 3 if the player is fully connected.
2025-02-02 12:40:04 +10:00
Lucas Nicodemus
e4e28cb1b5
Version tick: 5.2.2 2025-02-01 22:32:36 +09:00
ohayo
53789b40e4 Prevent further things from clients who dont handshake
- The player will only finish the handshake once they spawn their player, a normal client would always do this eventually.

- They cannot chat, even if they request world data but just not spawn their player.

- Other clients will not be notified of their join/leave in both cases (dont request WD or do but dont spawn)

- And most importantly, they do not show on the in game player list but still show on the server console /playing cmd.
2025-01-31 09:17:26 +10:00
ohayo
d35934b3a2 Check for bans on connection as well as join, etc
Should prevent people from being able to bypass this.
2025-01-30 22:46:13 +10:00
Luke
f3e0d04758 Merge remote-tracking branch 'upstream/general-devel' into net9-upgrade 2025-01-26 21:16:51 +10:00
Lucas Nicodemus
1762f59a78
Merge branch 'general-devel' into general-devel 2025-01-25 22:37:52 +09:00
Luke
90f1d49887 Replace AchievementInitializer MM IL with static hook 2025-01-11 14:39:14 +10:00
Luke
337f15c0ef Remote reset patch and MM dep
This is addressed in 24d30d37b3
2025-01-11 14:35:38 +10:00
quicm
5075997264 Add bandaid fix to RemoteClient.Reset for SecAd GHSA-hvm9-wc8j-mgrc 2024-12-17 01:15:56 +10:30
Cai
7419205548 rename 2024-07-31 19:24:53 +08:00
Cai
8df09cb4a8 fix: /help, /me, and /p commands can't work in non-English languages 2024-07-31 19:11:50 +08:00
Lucas Nicodemus
c67d5cf152
Version tick: 5.2 2023-05-10 01:51:05 -04:00
Jonathan Rascher
b833e48526 Remove unnecessary range check for quick stack 2023-03-09 21:55:52 -06:00
James Puleo
794bff5ef7
Initialize achievements and the AchievementManager on the server
The `AchievementTagHandler` expects `Main.Achievements` to be non-null,
which is not normally the case on dedicated servers. When trying to
parse an achievement chat tag, it will instead throw.

The tag is parsed when calling `ChatManager.ParseMessage`, which is used
in TShock when writing chat messages to the console. Our `OnChat`
handler uses `Utils.Broadcast`, which will send the message to all
connected clients, write the message to the console and the log. Due to
the order of execution, the message ends up being sent to all connected
clients, but throws whilst trying to write to the console, and never
gets written to the log.

To solve the issue, we make achievements available on the server,
allowing the tag handler to work as expected, and even allowing the
localization of achievements names to appear in the console.
2022-12-05 23:24:58 -08:00
ATFGK
e46bbe99c0
Pvp with no team (#2851)
* Update TShockConfig.cs

* Update TShock.cs

* Update GetDataHandlers.cs

* Update changelog.md

* Update GetDataHandlers.cs

* Update changelog.md

* Update changelog.md

* Update changelog.md
2022-12-05 22:27:42 -08:00
Luke
b24fd4fe43 Merge remote-tracking branch 'upstream/general-devel' into config/WorldTileProvider 2022-11-27 15:16:32 +10:00
Lucas Nicodemus
6421c7623a
Version tick: 5.1.3 2022-11-24 23:58:45 -07:00
Luke
b8afcd874d Add ToLower to WorldTileProvider switch
Allows "room for error in capitalization" as per review discussion.
2022-11-12 10:03:42 +10:00
Luke
0f46b1255a Add WorldTileProvider to tshock config
This allows the tshock tile providers to be switched via the config instead of cli args via tsapi, for environments where the command line args cannot be changed.
2022-11-12 07:28:26 +10:00
Lucas Nicodemus
15c8bf8436
Fix bug from i18nification
Wrong paren match
2022-11-10 00:25:45 -08:00
Lucas Nicodemus
ea96b3dc70
Version tick: 5.1.0 2022-11-10 00:09:39 -08:00
SGKoishi
fde43a7730
More i18n
Strings for player kick/ban, anti-cheating and server logs
2022-11-02 13:42:52 -07:00
Lucas Nicodemus
1baad06484
Version tick: 5.0.0 2022-10-31 16:51:05 -07:00
SGKoishi
d1a6c293f2
i18n commands 2022-10-24 13:49:26 -07:00
SGKoishi
b766e045b5
Use i18n for most string.Format if shown in log, console or client side 2022-10-24 13:38:33 -07:00
James Puleo
3163c88d4a
Allow PacketTypes.SyncLoadout during early connection
This mirrors the behavior in `MessageBuffer` when only accepting
specific packets under state `10`.
2022-10-22 17:14:56 -04:00