Use the 'add_module' macro to add modules without creating duplicate code. This macro also takes a reuse PCH as parameter, so modules that need a precompiled header, could reuse those from different targets that compile them. This commit also restructures the group order of the generated solution files for easier code navigation.
* All libraries have been isolated from each other, and build into separate artifacts.
* Project has been restructured to support isolating libraries.
* CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example).
* Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp).
TODO:
* Add a batch file to autogenerate all projects.
* Add support for dedicated server.
* Add support for client dll.
Bugs:
* Game crashes on the title screen after the UI script compiler has finished (root cause unknown).
* Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
Initial implementation of the bulk ban check system. This implementation takes a snapshot of the currently connected clients, sends it up to the master server, and the master server returns anything within this list that is marked 'banned'. The server would then kick the player from the server. This commit also removes the global banned list cache, as the bulk checking system offers a lot more freedom regarding banning specific players and have it sync across all available servers.
* Refactored code; kick & ban now share the same function.
* Kick & ban will now log a confirmation to the console.
* Players in refused list will no longer get banned, this was initially performed to keep load off the master server, but this turned out to be excessive. It also caused the side effect of having players banned even if their bans have been removed from the master server.
* Removed duplicate json parsing that was part of a PR that required a small refactor.
* Only check if response buffer is empty when we are going to parse the error message (this helps finding bugs in master server, since failure to parse has an exception handler).
* Log private server token and error messages to dedicated server console.
Used proper enum for context. The low level tier1 stuff should print in COMMON.
Also added newlines where missing, the logging system will undergo a change where a newline will only be appended if we are logging in the same context without a newline.
* Use 'CClient::Disconnect(..)' for all kicks and bans (this automatically clears the entire CClient slot, and removes the net channel).
* Only force disconnect when 'CNetChan::m_nSignonState' has a value that is not NULL.
* Clear the ServerPlayer slot on 'CClient::Disconnect(..)' and 'CClient::Connect(..)'.
* Only kick player for NetChannel overflow when value exceeds processing budget (not equals).
Implement net message process budget (channel gets removed if value is exceeded).
Use 'net_processLimit' to enable the implementation on the server. It will get enabled by default after testing and some cleanup. This helps against people trying to slow the server down by spamming net messages with a higher rate, e.g. using 'bind "mousewheel_up" "status"'.
* Replaced the boolean 'fatal' parameter with a error code parameter, anything non-null will prompt a message (fatal) and terminate the process with given error code.
* Fixed bug where the global ostreamsink for spdlog did NOT get cleared in 'SQVM_PrintFunc' when cvar 'sq_showvmoutput' was < 3. Moved to global scope.
* Added error message for when detouring the process has failed, with the error code.
* Only call 'Plat_GetProcessUpTime()' once per log, (improves performance and fixes bug where the error message box would show a different time stamp than what is logged into the console or file).
* All TIER0 loggers only log to notify and console when the SDK engine has fully initialized and detoured all functions.
* Fixed bug where multiple of the same entries get added to the global ban/refuse list.
* Fixed bug where we still use the client instance after deleting it in 'CBanSystem::BanListCheck()'.
* Load banlist at a later state (not at construction of class), this is needed for a future change of adapting the 'business' code to feature the game's FileSystem.
* CServer cleanup.
* More detailed ban messages (banned, added to refused list, removed from slot, etc..).
* Use localization key for banned message ("#Valve_Reject_Banned").
* Add const qualifiers to all CPylon methods.
Note:
* This commit requires changes on the master server, these changes are already performed, however the new master server isn't live yet until we publish the new release.
When we 'reload' the banlist, and have a valid file, none of the current bans in the vector will get overwritten. We clear the entire vector if valid, and rebuild it if the file is valid. if no file is found, or if access to file is denied, we assume the server operator wants all bans dropped.