MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.62k stars 391 forks source link

Possible to relog without specifying kickmessages? or regex support? #863

Closed hykilpikonna closed 4 years ago

hykilpikonna commented 4 years ago

So the server I connect to has an anti-afk plugin that kicks players with different kick messages every time. Are there any workarounds? For example an option to relog without checking kick messages, or does kick messages support regex?

JesperKuipers commented 4 years ago

did u try the anti afk option?

porkiedev commented 4 years ago

Check out my fork, Just pushed it today!

Adds a configuration option to ignore the kickmessages.txt file and relog anyway, regardless of the kick reason.

Mhowser commented 4 years ago

Ignoring the kick message and relogging regardless makes so much more sense, I think kick messages should be used to stop reconnecting, e,g "you have been banned" will stop the automatic reconnecting.

ORelio commented 4 years ago

Is your kick message perfectly random? Can you provide some samples? Indeed, the AutoRelog built-in bot is working with a white-list approach.

hykilpikonna commented 4 years ago

Is your kick message perfectly random? Can you provide some samples? Indeed, the AutoRelog built-in bot is working with a white-list approach.

The actual kick messages that I'm getting shouldn't be relevant to this topic since server admins can make plugins to kick afk players with any kick message format they want. Whitelisting would be a better solution, or else you can just implement regex support so that players can adapt their kickmessages with regex expressions that matches their corresponding format.

The kick message I'm getting:

[random string of length 8] :: AFK is not allowed :: [random string of length 8]

Example:

image image

ORelio commented 4 years ago

Simply put AFK is not allowed into kickmessages.txt. As long as the specified pattern is present, it will match. Also consider using AntiAFK and/or scheduling /move commands.

hykilpikonna commented 4 years ago

Simply put AFK is not allowed into kickmessages.txt. As long as the specified pattern is present, it will match. Also consider using AntiAFK and/or scheduling /move commands.

Ok, I didn't know it's testing Contains() instead of Equals(), so ignoring kickmessages can be achieved by listing every character in the alphabet and numbers in kickmessages.