Commit graph

137 commits

Author SHA1 Message Date
Marko von Oppen
8795aab810
Add command to disable Gravity (#1955)
Allow disabling gravity (flying) for servers that allow this.
/move gravity: show gravity handling status
/move gravity on: enable gravity handling (falling)
/move gravity off: disable gravity handling (flying)

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-03-06 19:37:27 +01:00
Daenges
4ba09754de
Add logging of color codes (#1811) 2021-10-30 11:40:58 +08:00
Daenges
6928cd40fd
Add toggle to head movement while walking (#1805)
* Add toggle to head movement while walking

* correct typo

* Correcting the correcting

* Improve description.

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-10-29 12:45:30 +08:00
ReinforceZwei
349a3de8e4
Update translation file indexes web URL to the latest (#1698) 2021-07-25 20:10:37 +08:00
ORelio
f16e9e87dd Add support for inventory layout as ASCII art (#906)
Inventory art mostly made by Mhowser
TODO: Implement remaining inventory types
2021-05-29 15:21:38 +02:00
ORelio
172e25fef0 Parse settings from the command line (#1578)
Allow specifying any setting as --setting=value
Sections other than main: --section.setting=value
Previous positional arguments are still supported
Update user manual with quick usage and examples
2021-05-20 21:40:57 +02:00
LesterLian
621e5e2200
Implement Realms support (#1533)
Resolve #51 

* Realms: update to new API; fix HTTP Get

* Realms: suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Realms: suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Add negative number support for JSON parser

* Nice print realms worlds result

* Option to join Realms world with world ID

* Suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Failure handle

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* world id paired with index

* fix text

* Clean up the code a bit

* Add setting for displaying Realms worlds

* Rename Realms worlds setting

* Put messages into translation file

Co-authored-by: Zizhen Lian <zizhlian@umd.edu>
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-04-12 19:46:33 +08:00
ReinforceZwei
d7089c534f
Adjust line break of default configuration file before writing (#1538) 2021-04-12 19:28:46 +08:00
ReinforceZwei
53e2413204
Add setting for overriding attack speed for autoattack (#1512)
* Add setting for overriding attack speed for autoattack

* Change cooldown value type to float

* Fix minor grammar issue
2021-03-28 19:26:38 +08:00
ReinforceZwei
240468ad22
Implement log to file logger (#1494)
* Implement log to file

Logger moved to it's own namespace

* Add lock to log file
2021-03-07 14:23:26 +08:00
ReinforceZwei
71eb1dca17
Implement browser sign-in method (#1447)
* Implement browser sign-in method

* Handle empty link

* Improve

* Handle user cancel login
2021-02-06 09:29:14 +08:00
ReinforceZwei
38a890f840
Implement new logger (#1426)
* Implement multi-channel logger

* Implement chat filter

* Improve a bit

* Improvement

* Add debug message filter and filter mode

* Avoid duplicate debug prefix string

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-01-29 07:45:18 +08:00
ReinforceZwei
c04c597aba
Implement Microsoft account login (#1397)
* Implement Microsoft account login
* Create proxied web request class
* Whole bunch of code that doesn't work
* I finally FIXED IT
It took me 2 hours to resolve the problem
* Fill the missed method summary
* Remove some unused code
* Revert http version
* Remove JSON parsing bug workaround
Not needed anymore as per e06438b582
* Remove comment asking about clientID
Client ID is used for session token refreshes. Random UUID without hyphens
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-01-06 21:14:51 +01:00
ORelio
330dda9c15 Add random demay in AutoRelog
Useful when reconnecting many accounts at once
Related issues: #663, #740, #975, #1312
2020-11-04 19:23:46 +01:00
ORelio
9169036893 Implement global chat message cooldown (#661)
Merge 'splitmessagedelay' and 'botmessagedelay' settings into
a single 'messagecooldown' entry, implement global cooldown to
fix autorespond, scripts and commands not being delayed properly.
2020-10-24 17:49:18 +02:00
ORelio
d3f150ba12 Allow force-enabling Forge support for 1.13+ (#1184)
Skip login step and join even when forge info is missing in server info.
However, this only works for 1.13+. Server info retrieval is required
for enabling Forge support on older Minecraft versions.
2020-10-18 13:09:49 +02:00
ReinforceZwei
2017d5d652
Add support of language files (#1273)
* Basic support of language file
Only mapped main part of MCC.
* Translations function imporve
* Change translation file naming
* Fix default translation file naming
* Complete translation file mapping for main part
Command and ChatBot not done yet
* Complete translation mapping for commands
Except Entitycmd
* Complete translation mapping for ChatBots
* Add new method for replacing translation key
Just for Entitycmd. Be proud of yourself. We have a convenient method now.
* Complete all translation mapping
* Add default config and translation file to resource
* Remove untranslatable messages from default translation file
2020-10-17 13:41:31 +02:00
ReinforceZwei
7e20e409a8
Add support for creating replay mod capture files (#1246)
* Add test replay handler
* Fix incorrect built raw packet
* Fix incorrect built raw packet
* Add filter
* Add not working zip lib
* Add dotNetZip lib and complete basic function
* Update ReplayHandler.cs
* Complete Replay handler
Without client player handling
* Complete replay mod
- New ChatBot OnNetworkPacket event
* Add auto-backup and command for Replay Mod
* Add ReplayMod description to readme
* Small naming changes, fix compile error on .NET4.0
* ReplayHandler slight optimizations
Use Path.Combine to automatically use Windows '\' or Linux '/'
Move re-usable common parts outside the Replay handler
Small optimizations in building JSON strings
Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-09-06 21:51:42 +02:00
ReinforceZwei
fb3f5ed040
Use MC 1.16 translation files (#1223)
In order to support newer translations like piglin-related kill messages
* Update translation file indexes web URL to the latest
* Update translation file local assets location
2020-08-20 13:07:13 +02:00
ReinforceZwei
e71d0e2383
Improve AutoAttack (#1218)
* Improve AutoAttack
- New attack mode
- Fix abnormally low attack damage
* Add document for AutoCraft
* Improve code style and user feedback
* Correct spelling mistakes
2020-08-18 13:02:36 +02:00
ORelio
a17d60047a Mailer: Fix case insensitivity for recipient (#1176) 2020-08-04 18:18:30 +02:00
Daenges
92e776cebc
Add Mailer bot (#1108)
* Update for the mail script.

As requested, I added the synchronization between the config debugmessage bool and the one in the script. Furthermore, I added a way to send anonymous mails by writing "tellonym". The messages are saved as normal mails, which lets them count to the mail cap, due to the fact that the host knows the sender.

I added the script to the chat bots because of the problems, that the scripts have with serialization. Instead of rewriting the whole serialization part, my idea was to add the script to the other chat bots, to avoid the compiling issues. Then the serialization would work perfectly fine. Then you could remove the option class at some point and move all the settings to the config file with the addition to activate the whole script.

* Correction of debug message loading.

The object was missing and the change would be overridden a few lines later.

* Update McClient.cs

* Add Mail to config file

* Correcting the safe file.

* Small correction of Settings.c

* Update Mailscript

Added a failsafe version of the path changing commands. If a path could not be found, an error will be created and the path will be reseted to standart, to avoid endless chains of errors.

* Fix for the mail script

Removed a wrong option call. Removed the debug_msg condition around the path functions. => Users are aware of what happened (if they see the error) although they turned off debug_msg.

* Added some features.

Added a try statement to all number changing commands. Added a command to list all moderators to the console.

* Serialization Fix

There was a chance, that if two bots work on one file, and two users send messages in a short time period, that one bot deserializes the message and then the other bot deserialize the same file, before the other one could save its changes. This would lead to one message disappearing, because one bot never deserialized this message. For this I changed the whole serialization process. 
All changes are now committed after the interval and not after an incoming mail command directly. All mails are safed temporarily in cache and get serialized after the interval. Due to this changes, you can determit when the individual bot changes the file (there are no more direct interactions with the file after a command, which lead to a certain randomness). Furthermore you can now set an interval of e.g. 2 mins and reset the interval of one bot with "resettimer" after one minute so that the bots won't disturb eachother and no files get lost.

* My idea of a manual.

This is my idea of a manual for the bot. Improvements of my language / further ideas are welcome! :D

* addIgnored [NAME] and removeIgnored[NAME]

Added an ignored list. Moderators can add players to the list. The bot won't react to them and just log to the console that they are ignored, everytime they are sending a message, to ensure that they are not accidently ignored. (Just if debug_msg is active.)
 Especially useful if there are other chat bots on the server, which spam many messages that aren't useful for the mail system. Or block spammers etc.

* Add the three commands to the manual.

Added addignored, removeignored and getignored to the manual.

* Remove moderators. Implement Console Control.

Due to security concerns, I converted all moderator commands to console internal commands. Thereby only the host can change crucial settings. Special thanks to ORelio for the hint!

* Added empty statement check

Added if to all commands, where the syntax is not already protected by a try, so that an incorrect syntax (Empty args[] due to missing statement) won't crash the script.

* Changed the serialization fail

If the programm can't safe the file, because of some strange character for instance, it first tries to change the path back to normal and if this not helps, it creates a new, file.

* toggle mail sending/receiving

Add an option to turn mailsending and the listening to commands in chat on/off.

* Updated manual.

- Removed moderator commands.
- Removed moderator part in the network manual
+ added the two new commands
+ added a waring for nick plugins and minecraft renames
+ added a small syntax example

* Updated the Settings.cs file.

* Smaller fixes and additions

+ improved command reading of 'mail' & 'tellonym'
+ sorted internal commands alphabetically
+ host can set a maximum message length
+ host can accept commands from public chat
+ host can decide if 'self mailing' (mailing yourself) is accepted
+ new order makes 'getsettings' easier to read
+ new internal commands to toggle 'publiccommands' and 'selfmailing' as well as the maximum mail size
- removed the old command interpreter

* Small improvements and additions

Added a few commands and settings

* Completing getsettings

+ added 'publiccomands'

* Completed getsettings

+ Added 'publiccommand' to 'getsettings'

* Removed single bolean, added Dictionary

- removed all boleans in the option class
- removed all functions relating them
+ added Dictionary for the booleans
+ added a single function to set/toggle all booleans

* Removed Commands, added interpreter

- Removed all Register commands
- removed all integer methods
+ added a single mail command
+ added integer dictionary
+ added integer handling similar like bool handling

* Small fix

+ Changed the numbers in several methods to adjust them to the new syntax.
- removed parameters in several methods, because they got unneccesary

* Even smaller fix

+ Sorted 'getsettings' alphabetically
+ corrected a typo

* New Serialization method.

Now serializing through the .INI format! Thanks to ORelio, who helped me a lot! :)

* Added different time

Added the option to switch between utc and the time of the local machine for timestamps.

* Made timeinutc serializable

Added the bool to the serialization method.

* Adding the INIFile.cs

For Dictionary serialization.

* Reworked ignore feature

Ignored players are now serialized in a file and reloaded, after the bot enters a server.

* Mailer bot refactoring

Rename Mail to Mailer
Move options to MinecraftClient.ini
Make the bot much simpler by removing some settings
Create specific MailDatabase and IgnoreList classes
However the core functionality for users is the same

Settings removed:
 - allow_sendmail: Cannot use Mailer if it's disabled
 - allow_receivemail: Cannot use Mailer if it's disabled
 - path_setting: Settings moved to MinecraftClient.ini
 - debug_msg: MCC already has a setting for that with LogDebugToConsole()
 - auto_respawn: MCC already has a built-in auto-respawn feature
 - allow_selfmail: Is it really necessary to block self mails? ;)
 - maxcharsinmsg: Automatically calculated based on max chat message length
 - timeinutc: DateTime is not show to the recipient so I think it's not absolutely necessary
 - interval_sendmail: Set to 10 seconds for now

Internal Commands removed:
 - changemailpath: Now a static setting in config
 - changesettingspath: Now a static setting in config
 - updatemails: Already updated every 10 seconds
 - getsettings: Shown on startup with debugmessages=true
 - resettimer: Seems only useful for debugging
 - setbool: Settings are static in config file
 - setinteger: Settings are static in config file

All user commands are retained:
 - mail
 - tellonym

* Reload database for mailer network feature

* Merge Mail documentation to Readme.md

Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-08-03 21:44:39 +02:00
ReinforceZwei
1b08e78463
New AutoDrop ChatBot (#1159)
* Add AutoDrop ChatBot
* Make AutoCraft config parse case insensitive
2020-07-30 21:06:36 +02:00
ORelio
e542612e76 Add warnings about bot owner spoofing (#1142) 2020-07-24 12:53:21 +02:00
ReinforceZwei
1960235968 Correct spelling mistakes
Add custom config path setting to AutoCraft
2020-07-23 19:19:32 +02:00
ReinforceZwei
6967f6928b Add config setting for AutoCraft 2020-07-23 19:19:32 +02:00
Grant Emsley
7d3e7f66f6 Add %login% variable 2020-06-09 23:22:22 +02:00
ORelio
b2bcfca8ec Allow Forge detection with manual MC version (#1004) 2020-05-24 19:53:31 +02:00
Reinforce Zwei
06ed5c0a45 Fix #1006 2020-05-22 17:30:02 +02:00
CarbonNeuron
5a0f106884 Get Rid of AutoLook setting. 2020-05-03 11:23:41 -05:00
CarbonNeuron
16959d6e65 Remove AutoLook.cs Chatbot because it is not in main project. Also removes it in McTcpClient.cs, and gets rid of the Settings.cs and Default paramaters. 2020-05-01 09:02:15 -05:00
CarbonNeuron
384c804e54 Added Entity Action handling, and A TSneak command that will Toggle Sneak. 2020-05-01 08:28:22 -05:00
ReinforceZwei
97b0b03c33 Move AutoEat to a ChatBot 2020-04-09 20:50:34 +02:00
ReinforceZwei
2e1e79bcef Add AutoEat
#923
2020-04-09 20:50:34 +02:00
ORelio
fe020c74c7 Catch exceptions from ChatBots for new API events 2020-04-02 23:31:00 +02:00
ORelio
c5b0f447c9 AutoRelog: Allow any kick message
Set ignorekickmessage=true in config
See issues #880 #921
2020-04-02 18:27:18 +02:00
ReinforceZwei
e93f03bd4e Add auto repsawn if player was dead 2020-04-01 20:53:40 +02:00
ORelio
00112e4c6a Give access to AutoRespond matches inside scripts
Available as %match_u%, %match_1% and so on
See #770 for initial suggestion
See #772 for in-progress implementation
2020-03-27 21:39:06 +01:00
ReinforceZwei
dbf5334758 Moved Auto attack and auto fishing to ChatBots and added ChatBotAPI for entity handling 2020-03-24 19:23:59 +01:00
ReinforceZwei
6ee16513e0 Final code clean up and adding summary 2020-03-24 19:23:59 +01:00
ORelio
9b9d4023bb Remind in config that inventory is not implemented yet 2020-02-11 21:33:22 +01:00
TheSnoozer
803532ce42 only attempt to convert the render distance to an int, if it looks like one 2019-09-23 22:32:28 +02:00
TheSnoozer
c6b4dc38d0 trim a string before tring to convert it to an int, if this still fails report it 2019-09-23 22:32:28 +02:00
TheSnoozer
46dd4bc35f include a message where the settings are loaded from (might help for issues where the user's think the settings are not loaded) 2019-09-21 14:42:00 +02:00
xPenguinx
9c0e3f3bcb Close Window & Toggle Setting 2019-05-28 18:53:40 +02:00
TheSnoozer
aad3d8b2ef https://github.com/ORelio/Minecraft-Console-Client/issues/525: general 1.13 support (v393 protocol). Note that terrainandmovements might cause some issues 2018-10-07 08:27:31 +02:00
ORelio
ecf0114f62 ConsoleIO: Sync with SharpTools
Had 2 versions of the ConsoleIO class, one here inc MCC (the original),
and another one in SharpTools, more generic, for use in other projects.

Both had diverged, this commit imports changes from the other repository.
This should not have any particular effect on MCC, besides adding more
documentation and settings in the source code of the class.

If any issue arises, as always, please report it :)
2018-05-28 22:09:50 +02:00
ORelio
143fcf7155 Move SessionToken.cs 2018-05-25 20:27:31 +02:00
ORelio
18fd24d2d5 Improve session caching
- Change SessionCache.db to SessionCache.ini
   Allows users to view and edit session cache

 - Automatically import previous SessionCache.db
   But this file is only read, not updated

 - Automatically import Minecraft session
   If you are logged in in Minecraft, no need to login again
   This is only done if Disk session cache is enabled
   See #232 and #430 for more information

 - Disk session cache becomes default
   The feature is no longer experimental and now recommended
   as the Mojang login servers now have a severe rate limit
   Previous default was Memory session cache, not saved to disk
2018-05-03 23:51:56 +02:00
ORelio
6c711055bd Add more comments in default MinecraftClient INI file 2017-01-04 21:54:08 +01:00