There is now a local function `Reject` that will handle logging,
rejecting, and (optionally) re-syncing upon a rejected packet.
Alongside this, the debug message has been improved to include the
sender index, buff type, receiver index, and the time in ticks (and the
existing reason for rejection.)
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.
This was previously using the constant `22` directly, instead of
`Player.maxBuffs`, which is now `44`. This theoretically allowed players
to smuggle buffs on to servers with SSC enabled, by using buff indexes
past `22`.
The player being CC'd does not cause any issues for us if SSC isn't
enabled, so we can relax it's restriction.
This also allows the `RequireLogin` config option to function usefully
again, as it would disable the player, causing them to be CC'd until
they logged in, creating a vicious cycle.
Due to an issue that stops the SSC config persister thing from working,
I moved the config item that's new back to the config file. I tried
applying the patches from
https://github.com/Pryaxis/TShock/pull/2354/commits but these didn't
actually resolve the issue. I'm keeping the commits here but I'm not
sure they help.
The core problem is this: if you add a new config file item to the ssc
config, the ssc config is overwritten with the default config items
instead of being merged automatically with the new items. This is a
critical issue as it means that SSC is disabled on all servers that had
it enabled and results in "data misplacement" which is alarming enough
to cause users to think they had data loss, which is not ideal.
Until the issue with the SSC config is resolved, I'm not willing or
confident to change it.