1502 Commits

Author SHA1 Message Date
Kawe Mazidjatari
7804241376 CClient: add rate limit logic for 'ProcessStringCmd'
Client's can run string commands on the server with no rate limit. This means when you run 50k+ commands that are unknown, or spam 30k 'status' commands, you will be able to hang the server for 800/1200ms (15k/30kms if script printing to console is enabled!). Although the netchan processing budget system will kick you, the damage has already been done at this point. This change effectively breaks the ability to DOS the server from the client using networked string commands.
In easier words; binding 'status' to your mousewheel will get you kicked from the server, without hitching the server.
2022-09-20 22:48:55 +02:00
Kawe Mazidjatari
793c2e8e50 Rename 'Reputation_t' enumerant 2022-09-20 02:04:25 +02:00
Kawe Mazidjatari
dcc2c6224b Improve NetChan process time limit
* Check if m_MessageHandler is removed before running limit test.
* Add warning DevMsg if client exceeds value.
* Default 'net_processTimeBudget' value to '200'.
2022-09-20 02:00:52 +02:00
Kawe Mazidjatari
21756f8057 Update SDK version to 'VGameSDK004' 2022-09-19 20:21:40 +02:00
Kawe Mazidjatari
41f801365a CConsole: fixed color bug when missing newline
* Fixed bug where the in-game console could not color the line when no newline was found.
* Changed behavior to only newline when: '\n' has been found, or the context has changed (using a print without newline will continue to print on the same line in the console).
* Pass ImVec4 parameter in 'CTextLogger::InsertTextAt' by reference.
2022-09-19 20:21:18 +02:00
I-Am-Zee
f2eb97bb26 Merge remote-tracking branch 'upstream/master' into indev 2022-09-18 20:25:39 -05:00
Kawe Mazidjatari
7b0baf5d1f CLogSystem: make notify fade out animation 500ms slower 2022-09-19 01:46:35 +02:00
Kawe Mazidjatari
58cadb529b 'Bad behaving player' systems improvement
* 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).
2022-09-19 01:28:43 +02:00
Kawe Mazidjatari
3311c99917 SQVM: use const qualifiers for SQCONTEXT 2022-09-19 01:18:14 +02:00
Kawe Mazidjatari
1ed7fd8203 Light warning string cleanup 2022-09-19 01:17:34 +02:00
Kawe Mazidjatari
fdd74aa622 Implement net message processing budget
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"'.
2022-09-18 23:19:50 +02:00
rexx
f81780a72d fix flags on sv_forceChatToTeamOnly 2022-09-18 21:49:14 +01:00
rexx
7e92150eae Merge branch 'indev' of https://github.com/Mauler125/r5sdk into indev 2022-09-18 20:42:18 +01:00
rexx
7d8d515190 add global text chat
use sv_forceChatToTeamOnly 0 to enable global chat
2022-09-18 20:42:16 +01:00
kralrindo
e22a45795f Custom trainer 2022-09-18 21:58:43 +03:00
kralrindo
25937055d3
Merge branch 'Mauler125:master' into master 2022-09-18 21:47:44 +03:00
kralrindo
d66e2a8da8 Add trainer to playlist 2022-09-18 21:47:20 +03:00
Kawe Mazidjatari
e90d2572b1 Implement 'ThreadInServerFrameThread()'
Tier0 export in r2, inline in r5.
2022-09-18 19:01:37 +02:00
Marvin D
514a407e4c RPakHeader_t/RPakLoadedInfo_t additions 2022-09-18 13:55:44 +02:00
Kawe Mazidjatari
6f7e275b9a Merge branch 'indev' 2022-09-18 01:26:08 +02:00
Kawe Mazidjatari
0b6eee20d3 Fix client.dll compile error 2022-09-18 00:48:00 +02:00
Kawe Mazidjatari
4ec7239b57 Add 'CNetChan::ProcessMessages(..)' hook body
Compat from S0 to S7.
2022-09-17 23:34:36 +02:00
Kawe Mazidjatari
8f2fb9b3a2 Light help strings cleanup
Everything marked '( !slower! )' could potentially slow the process down through usage or abuse (script prints could be abused as conhost is slow and bottlenecks the thread, they are by default only logged using SpdLog, which is very fast and won't cause a hitch even when you dump 2 live netchannels).
2022-09-17 20:48:41 +02:00
Kawe Mazidjatari
c523d13864 Remove FCVAR_CHEAT flag from 'net_tracePayload'
Flag is useless; allow dumping traffic at all times for static analysis (if launched as dev).
2022-09-17 20:43:16 +02:00
Kawe Mazidjatari
34b779735e Don't allow server to execute 'disconnect' on client
Removed extraneous 'FCVAR_SERVER_CAN_EXECUTE' flag. We disconnect clients using 'CClient::Disconnect(..)', relying on the client is useless without an anti-cheat and anti-tamper. Client can still use this to disconnect on its own though.

'migrateme' seemed useless as well, removed 'FCVAR_SERVER_CAN_EXECUTE'.

This makes all 'FCVAR_SERVER_CAN_EXECUTE' require 'FCVAR_DEVELOPMENTONLY' to be stripped, in order to execute without the '-devsdk' parameter (development launch arg),
2022-09-17 20:43:16 +02:00
kralrindo
94bea82358
Merge branch 'Mauler125:master' into master 2022-09-17 14:38:10 +03:00
kralrindo
3b66322b31 Add Mirage Voyage to playlists 2022-09-17 14:37:40 +03:00
I-Am-Zee
2a2be063fc update name vars foreach playlist 2022-09-16 16:06:38 -05:00
Kawe Mazidjatari
f6c37f5aad
Merge pull request #78 from kralrindo/master
Mirage Voyage Localization
2022-09-16 20:55:36 +02:00
kralrindo
a2cc62539c Mirage Voyage Localization 2022-09-16 18:29:23 +03:00
Amos
96b192075e Fix help string 2022-09-16 15:03:05 +02:00
Kawe Mazidjatari
3cbd98b900 Expose kick/ban/unban to UI SQVM 2022-09-16 01:40:17 +02:00
Kawe Mazidjatari
a68f55dac0 Move unban logic to CBanSystem and expose to Squirrel
New unban function in SERVER context 'UnbanPlayer(string criteria)'.
2022-09-16 00:51:35 +02:00
Kawe Mazidjatari
9c9843a0fc Centralize kick/ban wrappers to CBanSystem and add new server functions for kicking/banning players 2022-09-15 23:13:37 +02:00
Kawe Mazidjatari
d9ddb575e2 Add ConVar to auto-reload the server after x seconds.
This should allow users to host dedicated servers without looking back, as you should reload/restart a server every 3 hours (a full process restart is the most recommended option, but a 'soft' reload works like a charm most of the time).
2022-09-15 01:37:45 +02:00
Kawe Mazidjatari
9dd49af1dc Reset idle name on shutdown 2022-09-14 21:59:32 +02:00
Kawe Mazidjatari
d32a4f2df0 Fix bug where restart commands don't work
We reset the idle name in HS_GAME_SHUTDOWN, but the restart command callback uses the name field to 'map' into the same map (restarting), which causes issues when we reset it to 'server_idle'.
Changed behavior to only reset name (non recursive) if we are running but do not have an active game.
2022-09-14 21:51:15 +02:00
Amos
4d2c5513f2 Fix misspelled WSA error 2022-09-14 13:24:26 +02:00
Kawe Mazidjatari
84b4772006 Refresh server list when the browser is activated 2022-09-14 02:39:55 +02:00
Kawe Mazidjatari
242320e735 Also check CPU for SSE 3, SSSE 3 and POPCNT.
Check for SSE 3, SSSE 3 and POPCNT in CheckCPU(), and SSE, SSE2 in MathLib_Init().
This should fix all crash cases caused by launching the game on unsupported CPU's.
2022-09-14 02:23:06 +02:00
Kawe Mazidjatari
e0504d2828 Perform CPU check as early as possible
Check CPU as early as possible (first routine during init). This is required because SpdLog compiles down to SSE instructions.
2022-09-14 01:35:05 +02:00
Kawe Mazidjatari
729475c74c Light cleanup
Use NO_ERROR instead of NULL for error code parameter passed to Error(..).
2022-09-14 01:14:51 +02:00
Kawe Mazidjatari
3d6d6644bd Logging bug fix and error handling improvements
* 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.
2022-09-14 00:39:38 +02:00
Kawe Mazidjatari
d65bee5ffe
Merge pull request #77 from kralrindo/master
correct aim assist value for console, shadowfall dev playlist
2022-09-13 18:22:09 +02:00
Kawe Mazidjatari
2a2e27fbb7
Merge pull request #75 from KyeOnDiscord/patch-1
Cleaned up uMsg switch statement
2022-09-13 18:21:53 +02:00
kralrindo
7b181ca758 correct aim assist value for console, shadowfall dev playlist 2022-09-13 19:15:47 +03:00
D3-3109
309ae2a656
Change the custom_tdm default playlist settings
Change the custom_tdm default playlist settings and remove a duplicate configuration.
i mean maximum 3 teams and 3 players seems to be too less.
2022-09-13 12:52:49 +08:00
D3-3109
03f32fabb1
Change the custom_tdm default playlist settings
Change the custom_tdm default playlist settings and remove a duplicate configuration
2022-09-13 12:46:23 +08:00
Kye
a976d2868e
Cleaned up uMsg switch statement 2022-09-13 12:29:36 +10:00
Kawe Mazidjatari
88fcec1e69 Hook 'ConVar_PrintDescription' 2022-09-12 23:59:32 +02:00