-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
feat(legacy): chatcontrol module #4836
Draft
EclipsesDev
wants to merge
7
commits into
CCBlueX:legacy
Choose a base branch
from
EclipsesDev:feat-chatcontrol_module
base: legacy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+137
−49
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
19b3303
feat(legacy): chatcontrol module
EclipsesDev 560b7c0
Merge branch 'legacy' into feat-chatcontrol_module
EclipsesDev acf7d60
added en_us translation
EclipsesDev 59041dd
Merge branch 'legacy' into feat-chatcontrol_module
EclipsesDev 4684fd9
merged latest legacy
EclipsesDev 1f759d0
step one for stackmessage
EclipsesDev c330e01
chatControl final
EclipsesDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/ForceUnicodeChat.kt
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/main/java/net/ccbluex/liquidbounce/features/module/modules/misc/ChatControl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* LiquidBounce Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. | ||
* https://github.com/CCBlueX/LiquidBounce/ | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.misc | ||
|
||
import net.ccbluex.liquidbounce.features.module.Category | ||
import net.ccbluex.liquidbounce.features.module.Module | ||
|
||
object ChatControl : Module("ChatControl", Category.MISC, gameDetecting = false) { | ||
|
||
val noChatClear by boolean("NoChatClear", true) | ||
// TODO: Add StackMessage Counter (Done) | ||
// TODO: Combined duplicated messages (On-Progress) | ||
val stackMessage by boolean("StackMessage", true) | ||
val noLengthLimit by boolean("NoLengthLimit", true) | ||
val forceUnicodeChat by boolean("ForceUnicodeChat", false) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...va/net/ccbluex/liquidbounce/injection/forge/mixins/packets/MixinC01PacketChatMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* LiquidBounce Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. | ||
* https://github.com/CCBlueX/LiquidBounce/ | ||
*/ | ||
package net.ccbluex.liquidbounce.injection.forge.mixins.packets; | ||
|
||
import net.ccbluex.liquidbounce.features.module.modules.misc.ChatControl; | ||
import net.minecraft.network.play.client.C01PacketChatMessage; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(C01PacketChatMessage.class) | ||
public class MixinC01PacketChatMessage { | ||
|
||
@Shadow | ||
public String message; | ||
|
||
@Inject(method = "<init>(Ljava/lang/String;)V", at = @At("RETURN"), cancellable = true) | ||
public void injectForceUnicodeChat(String p_i45240_1_, CallbackInfo ci) { | ||
if (ChatControl.INSTANCE.handleEvents() && ChatControl.INSTANCE.getForceUnicodeChat()) { | ||
if (p_i45240_1_.startsWith("/")) { | ||
return; | ||
} | ||
|
||
StringBuilder stringBuilder = new StringBuilder(); | ||
|
||
for (char c : p_i45240_1_.toCharArray()) { | ||
if (c >= 33 && c <= 128) { | ||
stringBuilder.append(Character.toChars(c + 65248)); | ||
} else { | ||
stringBuilder.append(c); | ||
} | ||
} | ||
|
||
this.message = stringBuilder.toString(); | ||
} | ||
|
||
ci.cancel(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Searge be like:
❌ map the parameter names
✔️ leave it there, happens 99.99% of the time.