Skip to content

Commit d4cb566

Browse files
committed
Merge remote-tracking branch 'origin/ver/beta10' into feat/squads
2 parents f6d3d4d + 5587f4e commit d4cb566

27 files changed

Lines changed: 752 additions & 639 deletions

API/internal/rpc/authentication.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ func (s *AuthenticationServer) Login(ctx context.Context, req *pbapi.LoginReques
493493

494494
whitelisted := user.Entitled(models.EntitlementWhitelisted) ||
495495
user.IsPatron() ||
496+
containsIgnoreCase(s.whitelist.UsernameWhitelist, user.Name) ||
496497
containsIgnoreCase(s.whitelist.PersonaWhitelist, user.EAData.PersonaID)
497498

498499
if !whitelisted && s.whitelistEnabled {

API/internal/rpc/server_management.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ func (s *ServerManagement) GetPunishments(ctx context.Context, req *pbapi.Punish
9797
continue
9898
}
9999

100+
punishment.UserModel = user
101+
100102
convPunishments = append(convPunishments, punishment.Proto())
101103
}
102104

@@ -274,6 +276,16 @@ func (s *ServerManagement) BanPlayer(ctx context.Context, req *pbapi.ServerBanPl
274276
return nil, status.Error(codes.PermissionDenied, "You cannot ban the server host")
275277
}
276278

279+
activeBan, err := s.store.Punishments.GetBanForServer(ctx, server.HostID, target.ID)
280+
if err != nil {
281+
logger.L().Error("Failed to check punishment", zap.Error(err))
282+
return nil, status.Error(codes.Internal, "Failed to check punishments")
283+
}
284+
285+
if activeBan != nil {
286+
return nil, status.Error(codes.PermissionDenied, "User is already banned")
287+
}
288+
277289
var expiresAt *time.Time
278290
if req.Duration != nil {
279291
expiresAt = new(time.Time)

API/pkg/ws/server_manager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ func (sm *ServerManager) HandleServerWS(w http.ResponseWriter, r *http.Request)
421421
}
422422

423423
delete(sm.ownedServers, id)
424-
sm.mu.Unlock()
425424
}
426425

427426
sm.ownedServers[id] = &OwnedServer{Conn: conn}

CLI/lib/utils/mod_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class ModHelper {
77
ModHelper._();
88

99
static List<FrostyMod> filterGameplayMods(List<FrostyMod> mods) {
10-
return mods.where((mod) => ['gameplay', 'maps'].contains(mod.details.category.toLowerCase())).toList();
10+
return mods.where((mod) => ['gameplay', 'maps', 'map'].contains(mod.details.category.toLowerCase())).toList();
1111
}
1212

1313
static List<FrostyMod> expandMods(List<FrostyMod> mods) {

Launcher/lib/core/services/module_version_service.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ class ModuleVersionService {
261261
file.deleteSync();
262262
}
263263

264+
file.createSync(recursive: true);
265+
264266
final raf = file.openSync(mode: FileMode.write);
265267

266268
try {

Launcher/lib/features/game/dialogs/mod_limit_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ModLimitDialog extends StatelessWidget {
1515
),
1616
content: const Text(
1717
'''
18-
You have reached the maximum number of mods (247) that can be loaded.
18+
You have reached the maximum number of mods (1739) that can be loaded.
1919
To continue you must remove some mods from your collection.
2020
2121
This is a current technical limitation of KYBER and may be lifted in the future.

Launcher/lib/features/maxima/helper/maxima_helper.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class MaximaHelper {
6161
.launcherClient
6262
.getPreloadedMods(Empty());
6363
final modLimit = Preferences.general.enabledPreloadMods
64-
? 247 - preloadedMods.mods.length
65-
: 247;
64+
? 1739 - preloadedMods.mods.length
65+
: 1739;
6666
if (modPaths.length >= modLimit) {
6767
_logger.warning('Mod limit reached: ${modPaths.length}');
6868

Launcher/lib/features/mods/screens/mods.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class _ModsPageState extends State<ModsPage> {
8686
_handleShiftModSelection(mod, currentIndex, state, cubit);
8787
}
8888

89-
if (state.selectedMods.isEmpty) {
89+
if (cubit.state.selectedMods.isEmpty) {
9090
_lastSelectedIndex = -1;
9191
}
9292

@@ -142,7 +142,7 @@ class _ModsPageState extends State<ModsPage> {
142142
final isDeselecting = state.selectedMods.contains(mod.filename);
143143

144144
for (var i = start; i <= end; i++) {
145-
final selectedMods = Set<String>.from(state.selectedMods);
145+
final selectedMods = Set<String>.from(cubit.state.selectedMods);
146146
if (isDeselecting) {
147147
selectedMods.remove(state.mods[i].filename);
148148
} else {

Launcher/rust/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly-2025-01-01"
2+
channel = "nightly-2026-04-06"
33

44
targets = [
55
# Windows

Module/Public/Core/Client.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright Armchair Developers. Licensed under GPLv3.
2+
3+
#pragma once
4+
5+
#include <SDK/SDK.h>
6+
#include <SDK/TypeInfo.h>
7+
#include <SDK/Types.h>
8+
#include <Core/EventManager.h>
9+
#include <Network/SocketManager.h>
10+
#include <Voip/VoipManager.h>
11+
12+
#define OFFSET_GET_CLIENT_INSTANCE 0x14659DE50
13+
14+
namespace Kyber
15+
{
16+
__int64 ClientStateChangeHk(__int64 a1, ClientState currentClientState, ClientState lastClientState);
17+
18+
class Client : public EventListener
19+
{
20+
public:
21+
Client();
22+
~Client();
23+
24+
void Initialize();
25+
void InitializeHooks();
26+
27+
void HandleClientServerJoin(NetworkCreatePlayerMessage* message);
28+
void RegisterClientUpdatePassListener(ClientUpdatePassListener* listener);
29+
void AttemptJoinVoip();
30+
31+
// If proxied is true, IP is assumed to be a proxy ID
32+
void JoinServer(const std::string& id, std::string ip, uint16_t port, bool spectate, bool proxied = false, bool changeState = true);
33+
34+
__int64 ChangeClientState(ClientState currentClientState)
35+
{
36+
return ClientStateChangeHk(
37+
*reinterpret_cast<__int64*>(*reinterpret_cast<__int64*>(((__int64 (*)(void))OFFSET_GET_CLIENT_INSTANCE)() + 0x20) + 0x28),
38+
currentClientState, m_clientState);
39+
}
40+
41+
void OnEvent(const Event& event) override;
42+
43+
std::string m_joinToken;
44+
45+
ClientState m_clientState;
46+
47+
SocketManager* m_socketManager;
48+
VoipManager* m_voipManager;
49+
EventManager* m_eventManager;
50+
51+
std::vector<ClientUpdatePassListener*> m_updatePassListeners;
52+
53+
bool m_joining;
54+
bool m_spectator;
55+
bool m_connected;
56+
};
57+
} // namespace Kyber

0 commit comments

Comments
 (0)