114 Commits

Author SHA1 Message Date
David Markowitz
55d409eb82
Add invite initial response msg (#1775)
re-do team leave logic to send more accurate messages

Players are still able to leave the team with the same results as before, however now the correct messages are sent to team chats (no fixes for local teams).
2025-04-23 01:56:38 -07:00
David Markowitz
65f3c33ca5
chore: use client enum packet type instead (#1776)
Same values, different namespace and not duplicated
2025-04-23 01:55:52 -07:00
David Markowitz
6f94043b33
feat: broadcast achievements in chat as in live (#1771)
* feat: broadcast achievements in chat as in live

Tested that everyone on the receiving players' friends list receives the announcement as it went out in live.  Only works for achievements that have an entry in the MissionEmail table.  This may have been sent out to everyone in your zone as well however we don't really have a way to verify this aside from questioning why the client checks for the receiver being in the ignore list.  This is the only hint to me that this may have been broadcast to more than friends but again, no proof.

* Add initial response msg and sending

* Revert "Add initial response msg and sending"

This reverts commit fb942e4692747ff1debea2e0ad00d22dd0d632f3.
2025-04-19 07:36:53 -05:00
Aaron Kimbrell
566791e647
chore: limit API to only listen on localhost (#1740) 2025-01-25 20:47:12 -06:00
Gie "Max" Vanommeslaeghe
dc602a94eb
Merge pull request #1715 from DarkflameUniverse/webapiv2
feat: Chat Web API (now with no threading)
2025-01-17 22:38:15 +01:00
Aaron Kimbre
3faf9eea45 fix invalid players from showing up in api response 2025-01-15 15:50:30 -06:00
Aaron Kimbre
9542216650 comments and tweaks 2025-01-15 14:59:30 -06:00
Aaron Kimbre
5b8fe2cba0 refactor again 2025-01-15 13:48:49 -06:00
David Markowitz
8abc545bd1
fix: use generated bcrypt password for internal master connections (#1720)
* add password hashing for master server

* use define
2025-01-10 01:45:20 -08:00
David Markowitz
136133dde2
fix: friends (#1726)
* fix

* Update ChatPacketHandler.cpp
2025-01-08 22:44:55 -06:00
David Markowitz
23551d4ed8
fix: friends not updating and using incorrect world (#1724)
* fix: friends not updating and using incorrect world

* use better reset logic

* actual fix for real
2025-01-06 20:25:51 -06:00
Aaron Kimbre
72ae55981b fix here too 2025-01-06 13:55:43 -06:00
Aaron Kimbre
88376c233c cleanup and make the web routes cleaner 2025-01-06 01:23:29 -06:00
Aaron Kimbre
f3b4143698 fix typo 2025-01-05 18:31:53 -06:00
Aaron Kimbre
7a99e8ee6b don't unecessairly convert to string 2025-01-03 09:27:48 -06:00
Aaron Kimbre
210bc48149 return 204 when no data 2025-01-02 23:11:06 -06:00
David Markowitz
e757086465 include optimization 2025-01-02 20:28:03 -08:00
David Markowitz
e9ee3e21cf Update PlayerContainer.h 2025-01-02 20:24:53 -08:00
David Markowitz
631980af3a add json stuff 2025-01-02 20:14:07 -08:00
David Markowitz
6e66c5c362 works 2025-01-02 18:42:50 -08:00
Aaron Kimbre
7aaa69e42d lol, fix it 2025-01-02 20:19:23 -06:00
Aaron Kimbre
181bb0ce14 Address some fo the feedback 2025-01-02 20:09:44 -06:00
Aaron Kimbrell
2b325165aa
Update dChatServer/ChatWebAPI.h
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2025-01-02 20:03:59 -06:00
Aaron Kimbrell
94d53fa77c
Update dChatServer/ChatWebAPI.cpp
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2025-01-02 20:03:44 -06:00
Aaron Kimbrell
846ba894a4
Update dChatServer/PlayerContainer.cpp
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2025-01-02 20:03:16 -06:00
Aaron Kimbre
fd1ce75380 whitespace 2025-01-02 17:06:08 -06:00
Aaron Kimbre
3578076eca even more cleanup, and make the tryparse work properly 2025-01-02 17:04:07 -06:00
Aaron Kimbre
7d06d012b5 formatting and more cleanup 2025-01-02 16:48:31 -06:00
Aaron Kimbre
126701b5fe Make startup cleaner and don't listen by default 2025-01-02 16:35:27 -06:00
Aaron Kimbre
2d08ec641c cleanup and fixes 2025-01-02 16:28:34 -06:00
Aaron Kimbrell
9387a8e3d1
Merge branch 'main' into webapiv2 2025-01-02 16:13:17 -06:00
Aaron Kimbre
e86f4e011b redo it with mongoose
add all previous POC api endpoints
2025-01-02 16:11:45 -06:00
Aaron Kimbre
070bec697c Alllll the groundwork 2025-01-02 00:45:53 -06:00
David Markowitz
3ecbd1013b
fix: update player container on shutdown (#1704)
* update activity log on shutdown

* fix online notification

* update container on shutdown
2025-01-01 21:31:12 -06:00
David Markowitz
129d9fd0b9
update exception catching (#1661) 2024-12-04 03:30:14 -06:00
jadebenn
84d7c65717
consolidate the messagetype enums into a single namespace (#1647) 2024-11-17 18:39:44 -06:00
David Markowitz
628ac9807e
fix crash (#1644)
tested that sending an empty packet with this messageID no longer crashes the chat server
2024-11-17 18:07:40 -06:00
David Markowitz
33a8efdd22
fix slow code, add bounds checks (#1606)
Tested that players with valid names up to the usual 33 character max are still added to the player container
Tested that you can still team with <= 4 players on a team
Tested that chat server no longer crashes with a bad memberSize variable
asserted that InsertPlayer is indeed much faster now and is no longer a slow point of ChatServer
2024-10-26 22:09:32 -05:00
David Markowitz
01086d05c8
fix: use after free and uninitialized memory (#1603)
* fix use after free and uninitialized memory

* add if check for packet lengths

* move purge down further

Its used in the if check too...
2024-05-30 23:53:03 -05:00
Aaron Kimbrell
99e7349f6c
feat: slashcommands for showall, findplayer, get/openhttpmoninfo, and debug world packet (#1545)
* feat: showall, findplayer, get/openhttpmoninfo

http monitor info is planned to be used later, just putting in info that i've since reverse engineered and don't want lost

Additionally add debug world packet for duture dev use

Tested all new commands and variation of command arguments

* fix missing newline at eofs

* address most feedback

* Compormise and use struct with (de)serialize

* remove httpmoninfo commands
2024-04-17 21:47:28 -05:00
Aaron Kimbrell
20408d8dfe
chore: remove chat_internal and processes everything over chat connection (#1508)
* WIP

* get rid of redundent case and some formatting issues

* move some things around for cleaner diffs

* remove dead code that does nothing and add connection check

* fix whitespace

* address feedback
2024-03-31 22:27:50 -05:00
David Markowitz
1e09ec92e3
Update PlayerContainer.cpp (#1513)
Prevents a bad actor from possibly spamming the server with sequential IDs and allocating a bunch of memory.

Tested that I can still send and receive friend requests
2024-03-26 06:20:45 -05:00
Daniel Seiler
554a9a6806
fix: Dissolve more CMake dependencies (#1387)
* fix: more include changes

* fix: remove dZoneManager from global include

* fix: dDatabase

* fix: dCommon

* fix: object libs

* fix: rebase

* fix: bcrypt

* wip: try simplified connector build

* fix: update dockerfile

* fix: mariadb C/C++ on apple

* feat: Move scripts to CMAKE_MODULE_PATH

* fix: dPropertyBehaviors

* fix: macos?

* fix: Dockerfile

* fix: macos?

* fix: macos?

* fix: macos?

* fix: macos?

* fix: macos?

* try: install_name_tool

* fix not building on unix

* fix include paths

* Remove code changes

Will fix in another PR.

* format pass

remove 2 more included directories.
remove commented out code
add status to messages

* comments and format

surround include directories with quotes
remove commented out code
remove debug messages

* Update CMakeLists.txt

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
2024-03-05 20:13:24 -06:00
Aaron Kimbrell
398426545c
fix: default chat to the correct port when no option is given (#1484) 2024-02-27 15:56:58 -06:00
jadebenn
75544e3eec
chore: Change dServer and related code to use BitStream references (#1476) 2024-02-26 23:43:33 -06:00
jadebenn
29666a1ff7
chore: General cleanup roundup (#1444)
* Moved unrelated changes out of the TryParse PR branch

* const correctness and cstdint type usage

* removing a few "== nullptr"

* amf constexpr, const-correctness, and attrib tagging

* update to account for feedback

* Fixing accidentally included header and hopefully fixing the MacOS issue too

* try reordering the amf3 specializations to fix the MacOS issue again

* Amf3 template class member func instantiation fix

* try including only on macos

* Using if constexpr rather than specialization

* Trying a different solution for the instantiation problem

* Remove #include "dPlatforms.h"
2024-02-10 13:44:40 -06:00
jadebenn
0c1ee0513d
refactor: Change TryParse implementation (#1442)
* Changed how the TryParse function works (and also did some general cleanup along the way)

* Update noexcept attributes (verified these are correct)

* Add fp overload for MacOS functionality

* resolving some feedback

* Split out unrelated changes to CleanupRoundup branch

* Update in response to feedback

* the consequences of emo's member variable renaming request

* Revert "the consequences of emo's member variable renaming request"

This reverts commit bf318caeda34f4439c1769fd7d5b77d341f7f646.

* Fully revert renaming attempt

* Revert "the consequences of emo's member variable renaming request"

This reverts commit bf318caeda34f4439c1769fd7d5b77d341f7f646.

Fully revert renaming attempt

* Created ClientVersion.h and moved the client version defaults to it

* Fix partial parsing and MacOS floating point errors

* attempting fix to MacOS compiler error

* syntax pass (should be the last commit unless the CI fails)

* ah, wait, forgot to uncomment the preprocessor statements for MacOS. THIS should be the last commit pending CI

* Okay, one last thing I noticed: We were including C headers here. Now they're C++ headers. Pinky swear this is it!

* typo and I am OCD. please let this be the last

* hash is usally but not always noexcept, so the specifier should go

* Address MOST of the feedback

* address the claim codes issue
2024-02-10 05:05:25 -06:00
David Markowitz
4f3b4f5f43
fix uninitialized variable in PlayerContainer (#1423) 2024-01-18 02:11:49 -06:00
Aaron Kimbrell
6592bbea46
chore: remove all raw packet reading from chat packet handler (#1415)
* chore: default size to 33 on LU(W)Strings since that's the most common lenght
Was doing this on other places, but not the main one

* chore: remove all raw packet reading from chat packet handler

and general chat packet cleanup

* fix team invite/promote/kick

* Address feedback

* fix friends check

* update comments

* Address feedback
Add GM level handeling

* Address feedback
2024-01-14 01:03:01 -06:00
Aaron Kimbrell
0bc12141c3
chore: default size to 33 on LU(W)Strings since that's the most common lenght (#1410)
Was doing this on other places, but not the main one
2024-01-12 14:23:44 -06:00