* Groundwork for nanocom boosters
* The item use handler now has a switch for multiple item types (currently gumballs, and a stub for boosters)
* All item types are now checked for expiration, not just vehicles
* implement nanocom booster helpers, save and expiry
* implement authentic taro and fm modfication
* magic number and code refactor
* make sure only close by group members are counted
* add safe taro fm handling, rate command, race and mission booster logic
* add config option to disable authentic group scaling
* rename for consistency
* make rates percentages, fix chat message, add config options
* add config option to the ini file
* add index guard for hasBoost functions
* reorder config ini options
* add bank item expiry option
* fix trade oversight
---------
Co-authored-by: CakeLancelot <CakeLancelot@users.noreply.github.com>
This PR enables auth cookies to be used simultaneously with plaintext paasswords sent in the cookie authID field.
* Hoist a bunch of checks from the login packet handler into helper functions.
* Rename the LoginType enum to AuthMethod and distinguish it from the iLoginType packet field (see comment in code for why these should be decoupled).
* If the provided token does not pass the cookie check and password auth is enabled, treat it as a plaintext password and authenticate if it is correct.
* Auth cookie support
* Add config option for auth cookie support
* Safe handling of TEGid/auth_id strings
* Fix bad size calculation due to pointer cast
* Expiration timestamp instead of valid bit
* Change setting to "allowed auth methods"
This allows plaintext password auth to be disabled altogether
* PR feedback
Was getting frustrated by the inconsistency in our include statements,
which were causing me problems. As a result, I went through and manually
re-organized every include statement in non-core files.
I'm just gonna copy my rant from Discord:
FOR HEADER FILES (.hpp):
- everything you use IN THE HEADER must be EXPLICITLY INCLUDED with the exception of things that fall under Core.hpp
- you may NOT include ANYTHING ELSE
FOR SOURCE FILES (.cpp):
- you can #include whatever you want as long as the partner header is included first
- anything that gets included by another include is fair game
- redundant includes are ok because they'll be harmless AS LONG AS our header files stay lean.
the point of this is NOT to optimize the number of includes used all around or make things more efficient necessarily. it's to improve readability & coherence and make it easier to avoid cyclical issues
This prevents logic errors related to being in chunk 0 0 0.
Also:
* Moved some duplicated chunk teleportation logic to a new helper
function
* Made ChunkPos into a proper class so it can default to INVALID_CHUNK
when default-initialized
* Reversed the inclusion order of Chunking.hpp and Entities.hpp to work
around problems with type definitions
CNProtocol, CNShared, CNStructs and Defines are now in core/.
CNLoginServer, CNShardServer and Monitor are now in servers/.
core/Core.hpp wraps all the core headers except for CNShared.hpp.
Defines.cpp has been renamed to Packets.cpp, and so has its
corresponding namespace, but not the header file. This is in preparation
for upcoming changes.