@AndrewBruhMoment opened this Pull Request on January 29th 2021 First_time_contributor


What have you added and what does it do? (Alternatively, what have you fixed and how does it work?)

I have added a new command that acts as a spammer. The command syntax is ".spam <length> <delay> <chance> <message>".
<length> represents how many times the spammer repeats the message.
<delay> represents how long the spammer is to wait between messages being sent, in milliseconds.
<chance> represents the chance of characters to be remapped in the message.
<message> is the message to be remapped and spammed.

The characters that are mapped for replacement are: "ÃΒÇÐËfĜĤÌĴĶĹmŃÔpqŘŚŢÙΛŴ×ÝŽäΒçđêFğĥïĵķĺMńöPQŕŚ†üνŵXỳž"
Numbers "1234567890" and symbols "!?&." are also mapped, but have not been tested and may not work.
The argument which can use anything from 00 to 99, and can use an optional percent sign, acts as a percentage on how many characters to replace
All arguments after the chance argument are combined and used as <message>.
There are no hard-limits to the values set by the spammer, but a user will get kicked from any server after spamming for some time automatically. I do not know of a way to bypass this, but if there is a way, then it should be an easy fix, as I am currently using the code from sending the .say command.

The command checks to make sure that all arguments are valid and will throw an error that reflects on the issues that the user is having. If the user incorrectly uses the command, the error will help them correct their syntax.
During testing, one bug that has been fixed had appeared, but no others seemed to manifest.

(Optional) screenshots / videos

If applicable, add screenshots or videos to help explain your pull request.

Tests of the Spammer on a 1.16.5 Anarchy Server

This is a new pull request as the old one was cluttered and had missing and old information that did not reflect the current state of .spam.

@AndrewBruhMoment commented on January 29th 2021

All commits before https://github.com/Wurst-Imperium/Wurst7/pull/294/commits/3e37c7b32ba8858a5fd88d5ed45c2879d079d32c have been completed and tested on 1.16.5 Minecraft Servers and in Singleplayer, and no bugs were found. No compiler errors occurred.
Testing Machines:
RTX 3070 + Ryzen 7 3700x + 2GB to 8GB Allocated Ram
Random Macbook Air from 2016 (2GB - 4GB Allocated Ram)
GTX 1660 + Intel i5-7700k + 2GM to 8GM Allocated Ram

@AndrewBruhMoment commented on February 1st 2021

Currently, this spammer bypasses client-side AntiSpam. To stop this, I could add functionality to AntiSpam in a later pull, if requested. The new feature would detect if the remapped characters in the first and next message were both the same and would override the new message while keeping the original characters.

@WrightModz commented on April 1st 2021

Hey when installing this i get :CompileJava and it says ) expected at spamcmd.java:29: " represents the message you want to send. can have spaces in it." <- Im new to this and I dont know if im making a mistake but im just copy and pasting the files. I would appreciate some help Andrew thanks.

@WrightModz commented on April 1st 2021

Screenshot (91)

@WrightModz commented on April 1st 2021

got it working nvm

@AndrewBruhMoment commented on April 1st 2021

Hey @nofh428, I don't know what causes the issue you are experiencing, but I also had it, and it fixed itself after a bit. If you know the reason for this, please inform me so I can update it. Please also note that this pull request shouldn't include SitauraCmd, and I need to remove that as I have stopped working on it.