Commit graph

4283 commits

Author SHA1 Message Date
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
ff9cb9f858 Change the cast PacketTypes for 74 to its corresponding definition 2025-02-04 12:13:47 +10:00
ohayo
fa3c144274 Add necessary packets to a static hashset for further performance boosts
title
2025-02-04 11:28:09 +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
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
ohayo
4c01740177 Fix handshake stuff part 2
If the player has requested world data before sending the spawn player packet, they should be at state 3, otherwise they should be at state 1 for skipping it. Just check based on that instead.
2025-02-02 12:08:14 +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
Lucas Nicodemus
97d88b3b3c
Merge branch 'general-devel' into commandhooks 2025-01-27 10:06:01 +09:00
Lucas Nicodemus
fe3644ca80
Merge branch 'general-devel' into group-changes 2025-01-27 09:13:01 +09:00
Lucas Nicodemus
3115e1f032
Merge branch 'general-devel' into fix/player-data-is-sometimes-not-there 2025-01-27 08:57:36 +09:00
SGKoishi
605be8f813
Detect xterm compatibility to avoid console spam 2025-01-27 08:11:36 +09:00
SGKoishi
c4a141308e
Automatic language detection 2025-01-26 15:11:15 +09:00
Lucas Nicodemus
4cab985d0f
Merge branch 'general-devel' into accountgroupcupdate-hook 2025-01-26 12:59:15 +09:00
Lucas Nicodemus
9d96c02e2e
Merge branch 'general-devel' into fix/offnosave 2025-01-26 09:47:26 +09:00
Lucas Nicodemus
519f94116c
Merge branch 'general-devel' into general-devel 2025-01-26 09:38:37 +09:00
Lucas Nicodemus
18062c55e7
Merge branch 'general-devel' into netitem-changes 2025-01-26 09:02:51 +09:00
Lucas Nicodemus
b984ff8b65
Apply patch from https://github.com/Pryaxis/TShock/pull/3018
This applies https://github.com/Pryaxis/TShock/pull/3018 as a patch per @punchready because they deleted the head repository so that we can't merge it and none of the git objects have valid refs anymore on the command line and we can't merge it on the gui.
2025-01-26 08:45:11 +09:00
SGKoishi
65559d5db8
Merge remote-tracking branch 'upstream/general-devel' into pr3005 2025-01-26 01:22:34 +09:00
SGKoishi
6ee22758c1
Merge remote-tracking branch 'upstream/general-devel' into patch-1 2025-01-25 08:05:35 -08:00
Lucas Nicodemus
8f5a81014f
Merge branch 'general-devel' into patch-1 2025-01-25 23:08:28 +09:00
Lucas Nicodemus
a42046e79c
Merge branch 'general-devel' into consistency-playeractive-patch 2025-01-25 23:03:30 +09:00
Lucas Nicodemus
e6b1fb139f
Merge branch 'general-devel' into netitem-changes 2025-01-25 22:42:52 +09:00
Lucas Nicodemus
b9d984863d
Merge branch 'general-devel' into pr3005 2025-01-25 22:40:03 +09:00
Lucas Nicodemus
1762f59a78
Merge branch 'general-devel' into general-devel 2025-01-25 22:37:52 +09:00
renovate[bot]
9aba57dab6
Update dependency MySql.Data to 8.4.0 2025-01-25 13:31:02 +00:00
Lucas Nicodemus
b4968adb7d
Fix typo in config file
Closes https://github.com/Pryaxis/TShock/pull/3052
2025-01-25 22:29:56 +09:00
Lucas Nicodemus
748b516f3f
Merge branch 'general-devel' into dump-commands 2025-01-25 21:30:12 +09: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
Arthri
5c4db00f1e Fix Cursed Flare 2024-04-24 06:01:04 +00:00
ZakFahey
a19ac72e0d Lazy initialize TextLog._logWriter
There is an instance of this in SqlLog that's used as a backup, but since the StreamWriter is created in the constructor, the file is created too. This means that you'll get an empty text log created, every time a server starts up, even if you have text logs disabled. This is especially problematic when you have a multi-server setup with file write conflicts.
2024-02-18 11:36:26 -08:00
Johannes Grimm
aa526223a6 fix: off no save command
Added seting SaveOnSeverExit befor shutting down the server
Fixes #2938
2024-01-30 17:55:39 +01:00
SGKoishi
dbca317639
Update CursedInferno time limit 2023-12-27 13:01:55 -08:00
SGKoishi
cf726368c5
Use seconds as the time unit 2023-12-22 13:19:58 -08:00
SGKoishi
3c2a3f3e53
Add unstaged changes 2023-12-21 20:43:41 -08:00
SGKoishi
b6041a738e
Whitelist the Striking Moment (ParryDamageBuff) buff 2023-12-21 20:40:01 -08:00
Chris
3e64a9b82b
Merge branch 'general-devel' into patch-1 2023-08-15 19:17:35 +09:30
Zoom L1
c9f223e808
Merge branch 'general-devel' into accountgroupcupdate-hook 2023-06-17 19:03:44 +07:00
Zoom L1
228d5c7101
Merge branch 'general-devel' into netitem-changes 2023-06-17 19:00:12 +07:00
AkjaHAsLk1IALk0MasH
87fabd3d26 Removed the "obsolete" tag 2023-06-15 18:44:30 +07:00
AkjaHAsLk1IALk0MasH
723719350b Made PostPlayerCommandEventArgs inherited from HandledEventArgs. 2023-06-15 17:37:22 +07:00
AkjaHAsLk1IALk0MasH
db40d50348 Updated the message 2023-06-15 16:03:43 +07:00
Zoom L1
b40f0e632e
Update TShockAPI/Hooks/PlayerHooks.cs
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
2023-06-15 16:01:43 +07:00
Zoom L1
21422f25fd
Update TShockAPI/Hooks/PlayerHooks.cs
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
2023-06-15 15:51:01 +07:00
Zoom L1
e51b9f7874
Merge branch 'general-devel' into group-changes 2023-06-15 13:23:16 +07:00