Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Anti kick module always loaded even if i exclude it in loader.cs #220

Closed
3 of 4 tasks
cmmaio opened this issue Jan 10, 2024 · 12 comments
Closed
3 of 4 tasks
Assignees
Labels
bug Something isn't working

Comments

@cmmaio
Copy link

cmmaio commented Jan 10, 2024

What happened?

some modded lobbies wont let you join if antikick module is injected even if its off
excluding it in loader.cs file only turns it off but it still gets injected ingame

Current Commit Hash

b01dfa1

Injector

  • SharpMonoInjectorCore
  • Others

If you selected "Others" above, please specify the injector you are using.

No response

Log output

No response

Acknowledgement

  • I have confirmed that my anti-virus is not blocking any of the relevant programs
  • I have done my due diligence to check for similar issues
@cmmaio cmmaio added the bug Something isn't working label Jan 10, 2024
@winstxnhdw
Copy link
Owner

Can we confirm whether it is actually the AntiKick patch? Try deleting this file and see if it still blocks you https://github.com/winstxnhdw/lc-hax/blob/main/lc-hax/Scripts/Patches/AntiKickPatch.cs.

@tslpy1
Copy link

tslpy1 commented Jan 10, 2024

Can we confirm whether it is actually the AntiKick patch? Try deleting this file and see if it still blocks you https://github.com/winstxnhdw/lc-hax/blob/main/lc-hax/Scripts/Patches/AntiKickPatch.cs.

After enabling anti-kick, it seems that rooms with mods like kick mod installed can still kick us out.

@winstxnhdw
Copy link
Owner

Do you know which mod it is?

@winstxnhdw
Copy link
Owner

It's weird that they can kick you considering our names shouldn't even appear on their menu..

@tslpy1
Copy link

tslpy1 commented Jan 10, 2024

It's weird that they can kick you considering our names shouldn't even appear on their menu..

Based on listening to their voice, they can kick us out even if our names are displayed as "Unknown" or "Nameless" or if we imitate other people's names.

They seem to be able to see our names through the mod.

@winstxnhdw
Copy link
Owner

winstxnhdw commented Jan 10, 2024

Hmm..

I am wondering if we can just patch out this entire section and then spoof our Steam ID. What do you think @armorfid?

if (!GameNetworkManager.Instance.disableSteam && GameNetworkManager.Instance.currentLobby != null)
{
    if (!GameNetworkManager.Instance.steamIdsInLobby.Contains(newPlayerSteamId))
    {
	    NetworkManager.Singleton.DisconnectClient(this.actualClientId);
	    return;
    }
    if (StartOfRound.Instance.KickedClientIds.Contains(newPlayerSteamId))
    {
	    NetworkManager.Singleton.DisconnectClient(this.actualClientId);
	    return;
    }
}

@winstxnhdw
Copy link
Owner

I don't even have to do that. Just patch out DisconnectClient instead..

@winstxnhdw
Copy link
Owner

winstxnhdw commented Jan 10, 2024

I managed to spoof my Steam ID, yes I become unkickable but the game becomes basically unplayable. You play as the host's body, and you can no longer see the host. Your original character just stands still for the rest of the match. When the round is over, your ship never leaves. When the host disconnects, you still stay in the game.

@cmmaio
Copy link
Author

cmmaio commented Jan 11, 2024

Can we confirm whether it is actually the AntiKick patch? Try deleting this file and see if it still blocks you https://github.com/winstxnhdw/lc-hax/blob/main/lc-hax/Scripts/Patches/AntiKickPatch.cs.

deleted the cs files from patches and modules and disabled it from Loader.cs rebuilt it but still see the Anti Kick: Off in the lobby and prevents me from joining

@armorfid
Copy link
Contributor

armorfid commented Jan 11, 2024

I am wondering if we can just patch out this entire section

That chunk of code is server-side, it won't do anything if you patch it client-side, same with DisconnectClient

To be confirmed, but I think the anti-kick only actually works if you were the last player to join the lobby. All it does is prevent the game from putting you in the Esc menu player list as long as nobody joins after you, since AddUserToPlayerList is called from SendNewPlayerValuesClientRpc. If someone else joins, they will invoke the RPC and the whole player list will refresh. You will probably start showing up on there and can now get kicked.

The mods @tslpy1 mentioned will kick players directly using their Unity client ID from allPlayerScripts even if they don't show up in the Esc menu.

deleted the cs files from patches and modules and disabled it from Loader.cs rebuilt it but still see the Anti Kick: Off in the lobby and prevents me from joining

What's the error message? Is it "An error occurred", or something else?

@winstxnhdw
Copy link
Owner

deleted the cs files from patches and modules and disabled it from Loader.cs rebuilt it but still see the Anti Kick: Off in the lobby and prevents me from joining

The Anti Kick Off label you see actually has nothing to do with the Anti Kick patch so it's not Anti Kick that is blocking you from joining. It's something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants