mirror of
https://github.com/nihilvux/bancho.py.git
synced 2025-09-16 02:28:38 -07:00
Compare commits
2 Commits
8ac7eac9bd
...
2ab564a1f1
Author | SHA1 | Date | |
---|---|---|---|
|
2ab564a1f1 | ||
|
a7a301d3a2 |
@@ -77,7 +77,7 @@ DISK_CHAT_LOG_FILE = ".data/logs/chat.log"
|
||||
|
||||
BASE_DOMAIN = app.settings.DOMAIN
|
||||
|
||||
# TODO: dear god
|
||||
# TODO: im not doing this sorry vx
|
||||
NOW_PLAYING_RGX = re.compile(
|
||||
r"^\x01ACTION is (?:playing|editing|watching|listening to) "
|
||||
rf"\[https://osu\.(?:{re.escape(BASE_DOMAIN)}|ppy\.sh)/beatmapsets/(?P<sid>\d{{1,10}})#/?(?:osu|taiko|fruits|mania)?/(?P<bid>\d{{1,10}})/? .+\]"
|
||||
@@ -462,7 +462,7 @@ class StatsUpdateRequest(BasePacket):
|
||||
|
||||
|
||||
# Some messages to send on welcome/restricted/etc.
|
||||
# TODO: these should probably be moved to the config.
|
||||
# TODO: these should probably be moved to the config. ask vx if nessecary
|
||||
WELCOME_MSG = "\n".join(
|
||||
(
|
||||
f"Welcome to {BASE_DOMAIN}.",
|
||||
@@ -481,7 +481,7 @@ RESTRICTED_MSG = (
|
||||
)
|
||||
|
||||
WELCOME_NOTIFICATION = app.packets.notification(
|
||||
f"If you ain't 22, I aint touching you. -Yuki, 2025",
|
||||
f"Welcome back! Memento Mori.",
|
||||
)
|
||||
|
||||
OFFLINE_NOTIFICATION = app.packets.notification(
|
||||
@@ -576,6 +576,7 @@ async def get_allowed_client_versions(osu_stream: OsuStream) -> set[date] | None
|
||||
osu_stream_str = osu_stream.value
|
||||
if osu_stream in (OsuStream.STABLE, OsuStream.BETA):
|
||||
osu_stream_str += "40" # i wonder why this exists
|
||||
# TODO: Reverse the logic of whatever this is
|
||||
|
||||
response = await services.http_client.get(
|
||||
OSU_API_V2_CHANGELOG_URL,
|
||||
@@ -740,6 +741,7 @@ async def handle_osu_login_request(
|
||||
"osu_token": "no",
|
||||
"response_body": app.packets.login_reply(
|
||||
LoginFailureReason.AUTHENTICATION_FAILED,
|
||||
app.packets.notification(f"{BASE_DOMAIN}: Insufficient privileges.") #TODO: test in prod
|
||||
),
|
||||
}
|
||||
|
||||
@@ -788,6 +790,7 @@ async def handle_osu_login_request(
|
||||
# TODO: this user already has a registered hwid.
|
||||
# they may be multi-accounting;
|
||||
# there may be some desirable behavior to implement here in the future.
|
||||
# Try logging HWID sets, created accounts, and player patterns.
|
||||
...
|
||||
else:
|
||||
# this player is not verified yet, this is their first
|
||||
@@ -802,7 +805,7 @@ async def handle_osu_login_request(
|
||||
"response_body": (
|
||||
app.packets.notification(
|
||||
"Please contact staff directly to create an account.",
|
||||
)
|
||||
) # TODO: This user is a guarantueed multi-account. Implement monitoring.
|
||||
+ app.packets.login_reply(
|
||||
LoginFailureReason.AUTHENTICATION_FAILED,
|
||||
)
|
||||
|
Reference in New Issue
Block a user