Commit Graph

349 Commits

Author SHA1 Message Date
GeckoEidechse a37ef3ee98
Ignore folder rename (#245) 2022-08-24 23:36:27 +02:00
GeckoEidechse 2913fa5473
Add newlines at end of file (#247)
Co-authored-by: Northstar <northstar@northstar.tf>
2022-08-24 22:35:45 +01:00
GeckoEidechse 1809c22b08
Add editorconfig file (#246)
* Add editorconfig file

It's a cross-editor compatible config file that defines certain editor
behaviour (e.g. adding/removing newline at end of file)

It is supported by major editors like Visual Studio (Code) and by
version control  providers like GitHub.

Should end the constant adding/removing of final newline in PRs

* More settings

- unicode by default
- trim newlines
- use tabs for indentation (ugh)
2022-08-24 22:34:53 +01:00
BobTheBob f9bc3c9d18
Adjust folder structure (#242)
* Adjust folder structure

* change launcher directory name
2022-08-24 00:32:31 +01:00
Jack 812893d821
Add log colours because they are pretty (#237)
* log colours :)

* commend the freopen stuff (it causes problems)

* formatting

* add explanatory comment
2022-08-23 23:50:21 +02:00
BobTheBob e518c0213e
allow mods to load biks that aren't already present in r2/media (#137)
Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
2022-08-20 19:19:43 +01:00
GeckoEidechse 1346e7ee37
Remove potentially clashing define (#235)
The correct type is `uint8_t`, not `uint8` which is non-standard and is Microsoft specific.

Co-authored-by: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
2022-08-16 02:13:25 +02:00
ScureX 49263dd2a0
Hot reload banlist on player join (#233)
* added banlist hotreload

* fix formatting

* didnt append, cleared whole file oopsie

* unfuckedunban not rewriting file

* fixed not checking for new line
2022-08-14 11:37:18 +02:00
ScureX df056e7df3
Fixed `unban` not overwriting `banlist.txt` (#228)
* fixed unban

* changed timestamp for gecko

* fixed unbanning with inline comment

uids with inline comments werent able to unban due to whitespaces
2022-08-13 02:28:15 +02:00
ScureX 7fca4bd954
Allow comments and newlines in `banlist.txt` (#227)
* added support for comments and newlines

* added checking if line is empty earlier

* Fix formatting

* check if last char is \n
2022-08-10 22:30:52 +02:00
pg9182 5e7668c2cd
Fix most clang/mingw issues (#226)
- Fix include case.
- Replace MSVC-specific align with standard alignas.
- Type fixes.
- Delete operator noexcept.
- A few other minor issues.
- clang-format everything.
- Use c++20 instead of c++17.
- Rewrite ERROR macro for launcher_wsock32_proxy.
- Use a plain ifstream for the audio.cpp wavStream.

Note: When compiling with clang, you'll need -municode.

Related to #212.
2022-08-08 11:12:11 +01:00
Maya 286cea5f62
Fix using wrong Function and wrong function offset (#222) 2022-07-22 00:56:44 +02:00
Maya 938d89713e
Implemented Json into the squirrel vm (#172)
* Implemented Json into the squirrel vm

* Formatting

* More Formatting

* Even more Formatting

* Added Init functions to dllMain

* Formatting

* Changed to use Source Allocator

* Renaming Part 1

* Renaming Part 2
2022-07-21 02:54:00 +02:00
GeckoEidechse d20cf6f08a
Mention reproducing bugs and feature usage desc. (#221) 2022-07-20 12:43:03 +02:00
EladNLG 85635ad99d
Add dependency constants (#156)
* Fix duplicate script in scripts.rson when 2 mods add a custom script with the same path
Allow mods to force a VPK to load through vpk.json

* Remove unnecessary print

* Fix match predicate using the value instead of the name

* - Add a dependency constant system for use in compile flags
- Remove the duplicate script engine error fix
- Add ClientSq_defconst & ServerSq_defconst

* Format fix

* - Fix access violation
- Separate dependency constants into mod and add checks for conflicts

* - Remove unnecessary comment

* Remove VPK loading for now and allow 2 mods to use the same constant if the mod names match

* Fix bugs

* fix mistake

* fix keyvalues not working with modded files

* simplify code

* Fix formatting

* Remove keyvalues fix
2022-07-10 16:22:59 +01:00
Jack 151d678453
Add Postload support for rpaks (#217)
* fixed custom rpaks being loaded more than once

* formatting

* better things, although LoadPakSyncHook is annoying

* formatting

* removing unnecessary comments and stuff (whoops)

* Moving to use PakLoadManager

* formatting

* postload things

* formatting

* trailing space smh
2022-07-09 00:21:13 +02:00
Maya 9f8190486e
Add StringToAsset function to squirrel (#216)
* Add StringToAsset function to squirrel
also added better values for return type enum because otherwise asset can't be returned without casting

* Formatting

* Switched to a template for the stringToAsset function
also renamed files but have to do it in 2 commits because git ignores file case
* Rename step 2

* change to lowercase in include
* changed to lowercase in include inside dllmain
2022-07-09 00:17:05 +02:00
KittenPopo 5995a7462d
Fix KHook hooking order to prevent missed hooks (#213) 2022-07-05 02:19:57 +02:00
Maya 22a1ce87fa
Move #include top of file in ExploitFixes (#218)
* Move Include in ExploitFixes
* Formatting
2022-07-05 01:39:59 +02:00
Maya 5311105b5c
Block developer squirrel functions (#211)
* Block Dev Squirrel Functions
Some Command Line Functions are still allowed

* Renamed stub function and changed error message

* Formatting

* Change log level to warn
2022-06-26 22:17:16 +02:00
Maya d961347a61
Switch IsValveMod back to use a EnablerHook (#210)
* Switch IsValveMod back to use a EnablerHook
KHook version no worky

* Formatting
>:(
2022-06-26 22:16:50 +02:00
GeckoEidechse 660062b934
Log all clientcommands if `ns_should_log_all_clientcommands` is set (#209)
* Log all clientcommands if responding convar is set

* Also log UID

* Formatting

* Use `GetBool()` instead of `GetInt()`

* Adjust output print format
as suggested in review
2022-06-25 21:58:54 +02:00
Jack bb7a4c00de
fixed custom rpaks being loaded more than once (#202)
* fixed custom rpaks being loaded more than once

* formatting

* better things, although LoadPakSyncHook is annoying

* formatting

* removing unnecessary comments and stuff (whoops)

* Moving to use PakLoadManager

* formatting
2022-06-23 17:34:33 +01:00
KittenPopo d9328a186e
Fix rejection of legitimately-invalid UserCmds (#203) 2022-06-22 12:33:22 +01:00
KittenPopo c64a0d148f
ExploitFixes: Fix respawn exploit and block other Portal 2 commands (#204)
* Implement SpecialClientCommand hook (fix respawn exploit, etc.)

This replaces the old function_containing_emit_hook (who made it??? why is it so messy??? why is it in snake case???)

* Remove extra indents

* Blacklist additional commands

* Clarify (supposed) purpose of blocked commands
2022-06-22 12:32:51 +01:00
KittenPopo c7dd9ff6d4
Move LZSS exploit segfault fix hook to ExploitFixes.cpp (#195)
* Move LZSS exploit fix hook to ExploitFixes.cpp

* Formatting changes for clang-format
2022-06-19 23:46:03 +02:00
KittenPopo 0ffee77ca1
Use strtoull instead of strtoll for uint64s (#198) 2022-06-19 23:26:44 +02:00
F1F7Y a3eaa83222
Fix "Auth failed" when trying to play singleplayer (#184) 2022-06-16 22:51:08 +02:00
Kyle Gospodnetich 4487becdb8
LatencyFleX Implementation Update (#183)
Main entry point for LatencyFlex was recently changed from
latencyflex_wine.dll to latencyflex_layer.dll to prepare library for
eventual windows release/to be more generic. This updates our
implementation to match, while still supporting the previous libraries
for existing users.

Co-authored-by: Kyle Gospodnetich <KyleGospo@users.noreply.github.com>
2022-06-15 20:44:26 -04:00
pg9182 84ad1c2b2b
Open placeholder_playerdata as an input stream (#173)
Write access isn't needed.
2022-06-15 20:28:57 -04:00
KittenPopo 6a3958ea4e
Set default val for net_chan_limit_msec_per_sec to 100 (#196) 2022-06-16 02:00:50 +02:00
GeckoEidechse 76864937f3
Attempt reconnect in case of DUPLICATE_SERVER (#187)
* Attempt reconnect in case of DUPLICATE_SERVER

If gameserver receives DUPLICATE_SERVER response it will retry the auth
request after a timeout of 10 seconds.

Retries will stop after 10 attempts.

Co-authored-by: Emma Miler <27428383+emma-miler@users.noreply.github.com>

* Fix formatting

* Move comment

So that it refers to the right line

* Retry 10 times instead of just once

* Only check retrycounter for DUPLICATE_SERVER error

Co-authored-by: Emma Miler <27428383+emma-miler@users.noreply.github.com>
2022-06-16 01:37:29 +02:00
Emma Miler 7f70a1e46b
Localize error messages from masterserver (#159) 2022-06-16 01:36:41 +02:00
F1F7Y df8c4b26e7
Expose IsDedicated on server vm (#179) 2022-06-16 00:35:12 +02:00
Maya 93f10fd55c
Delete emit_blocker.h (#194)
* Delete emit_blocker.h
* also remove from dllmain.cpp
2022-06-16 00:29:39 +02:00
Emma Miler d9f39f14fa
Fix bug where emit wouldn't be blocked if uppercase (#192)
* Fix bug where emit wouldnt be blocked if uppercase
* Moved emit blocker to ExploitFixes.cpp
* Format change
* Use `strnicmp` instead of a custom functions
* Resolve merge conflicts
* Format changes
2022-06-15 01:10:39 +02:00
GeckoEidechse c5725b7855
Add pull request template (#188) 2022-06-15 00:05:24 +02:00
Tom Barham 25dbf729cf
Fix segfault on badly formed compressed packets (#160)
* Fix segfault on badly formed compressed packets

* Remove superfluous line
2022-06-15 00:05:06 +02:00
Tom Barham b84cd76f67
Guard against GetEntByIndex read out of bounds (#191)
* Guard against GetEntByIndex read out of bounds

* Move to ExploitFixes.cpp

* format

* Log out of bounds access
2022-06-14 22:07:04 +02:00
Barnaby acedd15c53
Fix typo in UID logs (#176) 2022-05-13 02:36:30 +02:00
BobTheBob 25579c16ca
Update serverauthentication.cpp (#161) 2022-05-13 01:55:47 +02:00
Emma Miler d333eabc1b
Block `emit` command when sv_cheats is disabled (#170) 2022-05-13 01:53:22 +02:00
GeckoEidechse 0c89946861
Log UID in a variety of places during auth process (#174)
* Log UID in a variety of places during auth process

* Log UID in CBaseClient__ActivatePlayerHook
2022-05-13 01:50:20 +02:00
Barnaby 0bd42559b5
Compare uid from connect on activate (#175)
* Compare UID from connect on activate

* only set uid on first time
i think
2022-05-13 01:49:43 +02:00
GeckoEidechse 6c8112a6c3
Hardcode version number (#152)
* Hardcode version number
This way, we don't get the wrong version number when launching
Titanfall2.exe via `-northstar`
The hardcoded value should be overwritten by CI on release

Fixes #129


* Set Northstar version in separate header file

* Make `northstar_version` array a constant

* Fix formatting
2022-04-27 22:56:13 +02:00
GeckoEidechse 3a1985d046
Write launcher version to log file (#153) 2022-04-26 00:13:39 +02:00
Emma Miler 90c123e6be
Make debugoverlay conform to clang-format (#151) 2022-04-24 00:10:51 +02:00
Emma Miler 0dbf856685
Fix debug builds (#150)
Properly initializes AuthData structs where used.
This does not get done automatically in debug mode because c++ is weird like that
2022-04-24 00:10:43 +02:00
r-ex c2f9dd4695
DebugOverlay (#106)
* DebugOverlay

yea

* default enable_debug_overlays to 0, and make FCVAR_CHEAT

Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
2022-04-21 03:03:09 +01:00
Northstar 47ea109be0
Format project 2022-04-13 19:30:40 -03:00