Commit graph

194 commits

Author SHA1 Message Date
Kat
b428b35f3d
a few fixes related to highscore notifications (#1086)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled
2025-01-14 03:13:41 +00:00
Kat
4f9dc2a52d
Notify a user when their highscore is beaten (#1083)
* Notify a user when their highscore is beaten

* formatting

Co-authored-by: sudokoko <sudo@koko.rip>

* noPrefix -> prefix

* documentation and fix closing tag

* better documentation

---------

Co-authored-by: sudokoko <sudo@koko.rip>
Co-authored-by: Josh <josh@slendy.pw>
2025-01-11 03:44:53 +00:00
FeTetra
f059b20489
Fix missing filtering, filter inconsistencies, and filter logging (#1082)
Some checks are pending
Continuous Integration / Build & Test (push) Waiting to run
Upload Translations to Crowdin / crowdin-sync (push) Waiting to run
Build Docker Image / Build and Publish (push) Waiting to run
Qodana / qodana (push) Waiting to run
* Fix missing filtering, filter inconsistencies, and filter logging

* Remove unused import and replace removed logger

* Make filter log arguments optional

* Update ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs

Co-authored-by: sudokoko <sudo@koko.rip>

* Update ProjectLighthouse.Servers.Website/Pages/Debug/FilterTestPage.cshtml.cs

Co-authored-by: sudokoko <sudo@koko.rip>

* Replace filter location strings with enum

* Rename enum to FilterLocation for readability

---------

Co-authored-by: sudokoko <sudo@koko.rip>
2024-12-11 01:01:37 +00:00
Henry Asbridge
f1fe542656
Add config options to restrict signup on certain platforms (#1077)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled
* feat: add config options to restrict signup on certain platforms

* add isPSN extension to platform enum

* actually forbid on invalid sign-up attempt, and fix compiler warnings

* Fix code review suggestions

* Apply suggestions from code review

Co-authored-by: Josh <josh@slendy.pw>

* Fix qodana pipeline

---------

Co-authored-by: Josh <josh@slendy.pw>
2024-11-02 16:40:55 +00:00
Josh
0af064ad1e
Implement player count per platform and player list API endpoints (#1014)
Some checks failed
Continuous Integration / Build & Test (map[database:true fullName:ubuntu-latest prettyName:Linux webTest:true]) (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
* Implement player count per platform and player list API endpoints

* Fix inconsistencies in the XML documentation

* Update PlayerListResponse.cs
2024-08-29 01:17:03 +00:00
Kat
fb2192d37d
filter locked levels from lucky dip (#1055)
* filter locked levels from lucky dip

* yeah sure

* put the filter in a more reasonable place
2024-08-29 01:16:08 +00:00
Josh
7fbfd618be
Merge pull request from GHSA-8q42-63xx-75pf 2024-06-25 04:18:43 -05:00
Josh
ed5bb5d769
Prevent LBP3 reviews from showing up in LBP2 (#1015) 2024-04-29 01:44:41 +00:00
sudokoko
67d0d3d7b1
Prevent duplicate profile pins 2024-04-05 10:00:16 -04:00
sudokoko
931f079265
Append line breaks after read only mode warning in announce text 2024-03-30 15:04:48 -04:00
sudokoko
0ee8970c64
Implement read-only mode (#1001)
* Implement read-only mode

* Use localized string under default language for announce text

* Redirect to user page rather than returning blank 400

* Protect call to `ParseBase64Image`

* Add protections to SlotSettingsPage and nitpick format

* Display the latest announcement (if any) on the landing page

* Fix a kokoism

Accidentally tried to use markdown within the landing page... I'm rather smart aren't I

* Prevent possible XSS

* Separate truncated announcement text and link with "..."

* Apply suggestion from code review

* Add read-only check to /postComment in slot page controller

* Fix inconsistent tabbing
2024-03-30 02:51:12 +00:00
sudokoko
5283001511
Remove IP addresses from game tokens and matchmaking 2024-03-17 21:41:10 -04:00
sudokoko
a9944ec74d
Fix issue where last contact isn't sent if matchmaking is disabled 2024-03-17 19:58:14 -04:00
sudokoko
be452270e3
Return bad request instead of forbid when matchmaking is disabled
Prevents the game client from reauthenticating every time it requests /match
2024-03-17 19:02:06 -04:00
sudokoko
5035dbb63d
Add the ability to disable matchmaking in configuration 2024-03-17 18:51:43 -04:00
sudokoko
01e6fa191a
Update to .NET 8 and C# 12 (#952)
* Initial SDK and dependency bumps

* Bump Pomelo.EntityFrameworkCore.MySql to 8.0.0-beta.2

Should fix the MissingMethodException error in unit tests

* Update CI workflow to use .NET 8

* Apply suggested change from compile time warnings

* Fix digest tests

* Bump dependencies once more

* Update xunit

* Remove obsolete ISystemClock from TokenAuthHandler

* Update dependencies

* Add digest debug preprocessors back

* Maybe don't break #966

* Bump EF Driver and update various NET7 references

* Fix warnings in digest middleware tests

---------

Co-authored-by: Slendy <josh@slendy.pw>
2024-02-26 20:08:48 +00:00
Josh
a2eaedc85b
Sort team picks by the time they were team picked (#980) 2024-02-23 14:38:02 +00:00
sudokoko
c9e5295338
Fix broken planet updates 2023-12-28 13:31:20 -05:00
Slendy
b39038008d
Use HashSet to store texture guids instead of List 2023-12-23 20:07:03 -06:00
sudokoko
ef87606ba2
Merge pull request from GHSA-c8wx-65c7-q9r3
Co-authored-by: Slendy <josh@slendy.pw>
2023-12-23 00:49:59 -05:00
W0lf4llo
e593d5c957
Add Challenges Support to LBP3 (#941)
* Adds Challenges and Promotions (No resources included for Promotions)

* Adds Challenges and Promotions (No resources included for Promotions)

* Adds Challenges and Promotions (No resources included for Promotions)

* Created GameChallenge Class.

Co-authored-by: koko <koko@sudokoko.xyz>

* Add serialization logic and official server challenge config

* Fix schema and simplify things

* Renammed some classes

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Types/Serialization/GameChallenge.cs

Co-authored-by: Josh <josh@slendy.pw>

* Fixed a simple coding error

* Update ProjectLighthouse.Servers.GameServer/Controllers/Login/ClientConfigurationController.cs

Co-authored-by: Zaprit <henry@vorax.org>

---------

Co-authored-by: koko <koko@sudokoko.xyz>
Co-authored-by: Josh <josh@slendy.pw>
Co-authored-by: Zaprit <henry@vorax.org>
2023-11-05 16:49:16 +00:00
sudokoko
69855406f5
Miscellaneous website/moderation/notification fixes (#940) 2023-10-30 17:46:05 +00:00
Josh
b8324d0c10
Migrate to GitInfo for embedding git information (#911)
* Migrate to GitInfo for embedding git information

* Adjust gitignore to reflect new git system

* Fix changes from broken merge

* Remove vestigial code in VersionHelper

---------

Co-authored-by: sudokoko <koko@drones.gay>
2023-10-29 23:50:16 +00:00
sudokoko
aea66b4a74
Implement in-game and website notifications (#932)
* Implement notifications logic, basic calls, and admin command

* Remove unnecessary code

* Add ability to stack notifications and return manually created XML

* Remove test that is no longer needed and is causing failures

* Apply suggestions from code review

* Merge notifications with existing announcements page

* Order notifications by descending ID instead of ascending ID

* Move notification send task to moderation options under user

Also restyles the buttons to line up next to each other like in the slot pages.

* Style/position fixes with granted slots/notification partials

* Fix incorrect form POST route

* Prevent notification text area from breaking out of container

* Actually use builder result for notification text

* Minor restructuring of the notifications page

* Add notifications for team picks, publish issues, and moderation

* Mark notifications as dismissed instead of deleting them

* Add XMLdoc to SendNotification method

* Fix incorrect URL in announcements webhook

* Remove unnecessary inline style from granted slots partial

* Apply suggestions from code review

* Apply first batch of suggestions from code review

* Apply second batch of suggestions from code review

* Change notification icon depending on if user has unread notifications

* Show unread notification icon if there is an announcement posted

* Remove "potential" wording from definitive fixes in error docs

* Remove "Error code:" from publish notifications

* Send notification if user tries to unlock a mod-locked level

* Change notification timestamp format to include date

* Add clarification to level mod-lock notification message

* Change team pick notifications to moderation notifications

Apparently the MMPick type doesn't show a visual notification.

* Apply suggestions from code review

* Add obsolete to notification types that display nothing in-game

* Remove unused imports and remove icon switch case in favor of bell icon

* Last minute fixes

* Send notification upon earth wipe and clarify moderation case notifications

* Add check for empty/too long notification text
2023-10-29 20:27:41 +00:00
Zaprit
98b370b106
Missing digest message change (#935)
* Changed missing digest message to more accurately reflect what will be wrong if it's not set

* Update ProjectLighthouse.Servers.GameServer/Startup/GameServerStartup.cs

Grammar is difficult.

Co-authored-by: sudokoko <koko@drones.gay>

---------

Co-authored-by: sudokoko <koko@drones.gay>
2023-10-29 11:31:23 +00:00
Josh
58664a2c7e
Add checks for resource strings (#930)
* Add checks for resource strings

* Don't use resource regex against png files
2023-10-24 22:14:52 +00:00
koko
f09bde1ab1
Fix typos in privacy settings element names (#884)
* Fix typos in privacy settings element names

* Remove redundant nullable directive
2023-08-29 18:49:05 +00:00
Slendy
f0a1826b85
Only update score timestamps when you get more points 2023-08-28 16:32:58 -05:00
Josh
a316c866c5
Add proper relationships to Comments (#838)
* Add specific foreign keys for comment targets

* Remove inheritdoc tags from migration

* Fix punctuation of deleted comment message and add mod deletion message

* Fix broken merge

* Cleanup comment queries
2023-08-24 18:58:03 +00:00
Josh
70a66e6034
Migrate scores to use proper relationships (#830)
* Initial work for score migration

* Finish score migration

* Implement suggested changes from code review

* Make Score Timestamp default the current time

* Chunk insertions to reduce packet size and give all scores the same Timestamp

* Fix serialization of GameScore

* Break score ties by time then scoreId

* Make lighthouse score migration not dependent on current score implementation
2023-08-19 07:32:38 +00:00
Slendy
1c00db53ae
Fix photo upload timestamp regression 2023-07-18 01:28:31 -05:00
Slendy
20a5fa6aa3
Fix sorting by game on LBP2 2023-07-17 15:09:45 -05:00
Slendy
21dce144ce
Make LBP3 lucky dip lucky again 2023-07-14 16:43:51 -05:00
koko
25bb2ecfc1
Add the ability for moderators to forcibly lock levels (#831)
* Add the ability for moderators to forcibly lock levels

* Prevent forcibly locking an already locked level

I had to rollback and re-commit this because I was getting some weird error within Rider.

* Correct moderation notice header styling & remove errant text
2023-07-07 22:44:05 +00:00
Josh
14ebad07f3
Allow moderators to moderate story levels (#809)
* Allow moderators to view story levels on website
Show comments to moderators on in-game story levels that show the levels id

* Only show LH ID comment on the first page
2023-06-26 23:52:15 +00:00
Slendy
3b0c0c9b0e
Fix score parsing for versus scores 2023-06-26 18:50:38 -05:00
koko
689ebd3791
Optimize GameServer /announce and add website announcements (#810)
* Improve game server announce by using StringBuilder

* Implement web announcements (condensed commit)

* Implement discord webhook support

* Display a separate message if there are no announcements

* Fix announcement string unit tests

* Fix header admin button unit test

* Clarify announcement id variable name

* Increase webhook truncation limit to 250 chars

* Convert announce text to string when returning 200

* Fix announcement unit tests ... again

* Make announcement text input a textarea rather than a simple input

* Fix styling discrepancy

* Clarify submission button

* Improve announcement webhook & set default textarea row amount
2023-06-23 03:49:22 +00:00
Slendy
ab98da42c3
Fix LBP2 recently played for story levels 2023-06-20 02:16:48 -05:00
Josh
e43397ac6a
Implement property dependency injection for the website (#806)
* Remove most non DI usages of DbContext

* Optimize website queries and refactor startup to use top level statements

* Remove unused functions in UserEntity and SlotEntity

* Optimize LBP1 LevelTags
2023-06-20 05:02:24 +00:00
koko
e5cfeb1e39
Censor filter logging improvements (#804)
* Move censor/msg logging to MessageController & separate LogAreas/config

* Correct LBP character limit to 95

* Log filtered comments as well

* Remove two unnecessary variables from CensorHelper

* Add censor logging to SlotPage/UserPage controllers and improve logging slightly

* Remove accidental dollar sign in log

* Grammatical nitpick in CommentController.cs

* Contextual nitpick in MessageController.cs

* Add escaped quotes in CommentController log to match the rest

* Increase limit to account for descriptions, magic mouth, etc.

* Consolidate LogChatMessages logging into Filter log area to prevent confusion

* Apply code review suggestions
2023-06-18 23:39:39 +00:00
Josh
a0d021f1e2
Refactor RepeatingTaskHandler (#796)
* Refactor RepeatingTaskHandler into an ASP.NET service

* Add unit tests for RepeatingTaskService

* Make repeating task unit tests work independent of time

* Fix weird behavior when task is canceled
2023-06-17 19:48:24 +00:00
Slendy
91e792aea0
Fix level ordering in busiest slots 2023-06-14 11:16:16 -05:00
Slendy
db5d9c2a39
Fix sublevels not loading 2023-06-10 23:03:05 -05:00
Slendy
8b0aed9a61
Fix level photos by author 2023-06-06 23:30:37 -05:00
Slendy
d4b9ca666b
Add ordering to LBP2 search 2023-06-06 23:16:54 -05:00
Josh
a69d94054b
Simplify filters and make cross control slots not show by default (#782)
* Simplify filters and make cross control slots not show by default
Also sort author levels by oldest levels first rather than newest levels first.

* Fix unit test expecting slots to sorted by timestamp descending

* Remove errant whitespace
2023-06-05 22:53:41 +00:00
Slendy
c9784cf8c9
Fix hearted profiles being sorted in reverse order 2023-05-31 21:25:35 -05:00
Slendy
0b936d3e5d
Implement deleting playlists
Also fixes playlists visually not updating in-game when modifying them
2023-05-31 20:37:17 -05:00
Slendy
cd926a8415
Refactor LBP3 text search to use the category system 2023-05-31 20:35:39 -05:00
Slendy
2ec6bff8e2
Fix number of returned slots being capped at 30 2023-05-31 19:06:36 -05:00