Commit graph

191 commits

Author SHA1 Message Date
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
ORelio
8ec2b2e570 Use short SRV resolving timeout
By default, lower SRV resolve timeout from 30 seconds to 5 seconds
Should help people facing SRV issues, see #213
Timeout can be set to 30 seconds in settings.
2016-11-17 11:18:35 +01:00
ORelio
68eeadf59a Allow disabling SRV DNS record resolving
Workaround fix for issue #208
2016-10-23 19:52:02 +02:00
ORelio
1180c06b1f Show links embedded in chat
Allows clicking if supported by terminal,
or at least copy and paste to web browser.

Suggestion by brkmrr9 in #207
2016-10-07 19:52:28 +02:00
ORelio
9cd983c50d Add support for Minecraft Service DNS Records
- Add DnDns library for performing DNS queries
 - Add query method for SRV record
 - Resolve Minecraft services

This allows resolving actual server addresses for
servers using SRV records on their domain names

SRV records are basically DNS redirection eg:

  myserver.net -> srv1.myserver.net:12345

Should solve #186 reported by sammyvsparks and many others.
2016-10-06 19:13:58 +02:00
ORelio
61ce935c63 Add support for Minecraft Settings
- Add Minecraft vanilla settings from Settings screen
 - These settings are sent to server when joining
 - Allows to customize skin layers shown to other players
 - Most other settings are ignored by servers
 - Update language file from 1.9 to 1.10 version
 - Minor aesthetic changes in INI file comments

Suggestion by TNT-UP in issue #161 and Splodger1 in MC Forum.
2016-08-26 12:21:38 +02:00
ORelio
4c460537e4 Allow bot owner list in a file
Suggested by AppleCidar in #185
2016-08-22 20:05:09 +02:00
ORelio
a4cc36ce05 Allow restricting AutoRespond matches to bot owner
Suggestion by AppleCidar in #184
2016-08-21 19:53:31 +02:00
initsuj
aff1c04f2d Removed unneeded temp login variable. Made server alias check conditional 2016-06-26 15:29:21 -07:00
initsuj
554aa358b5 Attempt to expand user and server aliases after accounts.txt and servers.txt file loaded. 2016-06-26 14:27:04 -07:00
ORelio
f37bd96ff9 Fix '#' being stripped in INI file password field
Bug report by Sheridan in #151
2016-05-12 22:20:06 +02:00
ORelio
d45f75f9f4 Reduce output verbosity, default session cache
- Memory session cache will be used by default
 - Verbose messages are now hidden by default
 - Improve ping procedure's Forge handling
 - Fix 1.8.9 and 1.9.0 in mcversion setting
 - SessionCache.cs: fix LF into CRLF
 - Use 1.9 translations instead of 1.8
2016-03-10 13:29:05 +01:00
initsuj
57c53be09f caching works. needs documentation and testing 2016-03-02 17:11:15 -07:00
initsuj
1a41c42ba9 Cache settings are written and parsed. 2016-03-01 19:20:05 -07:00
Pokechu22
5c8f66dbd0 Fix broken new line in settings
Fixes #115.
2016-02-26 18:01:05 -08:00
Pokechu22
8ce685892c Update to 1.8's language files.
I ocasionally see untranslated messages; this should resolve all of them.

The changes to Settings.cs, the core changes, just update the index file used and the normal hash.  The changes in ChatParser.cs primarilly fix the name: 1.7.4 used 'lang/en-GB.lang' but 1.7.10 and 1.8 use 'minecraft/lang/en-GB.lang' and 'realms/lang/en-GB.lang' (and realms comes first), meaning that the wrong language file is selected.  The name is updated to make sure the right file is used.  I also corrected the indentation in that block.
2016-01-30 22:14:53 -08:00
Pokechu22
207732cd86 Add an option to add a delay between bot message
Because bots can send several messages quickly, this adds an option to slow down the rate at which messages are produced (to avoid issues with antispam plugins).  This should help solve part of the troubles @mobdon was having in #105.

Right now the default time is 2 seconds per message.  However, messages are sent imediately if the bot doesn't need to delay (so if it's a bot that only outputs one or two messages, those will still happen imediately).  Also, note that it's limited per-bot right now.

I also added an optional parameter to the SendText method so that bots can avoid this behavior if they need to.  In some cases, they'll want to send multiple messages.
2016-01-29 16:18:59 -08:00
ORelio
ba41268aca Add setting for setting private msg command
So that the /tell command can be changed into eg /msg.
Suggested by _initsuj
2016-01-27 00:23:29 +01:00
ORelio
b0c8f82697 Add simple movements with /move command
- Determine if we can move to the specified direction
 - Add moving ability to the specified direction
 - Add /move command for triggering moves
 - Add move decomp. into steps (more natural)
 - Add pathfinding routines (still WIP)
 - SO YES YOU CAN NOW WALK USING MCC!!!
2015-12-12 16:48:38 +01:00
ORelio
cb00c28b6e Add world handling (and fall to ground)
- World is now properly parsed and stored from chunk data
- Block changes are also handled and world updated accordingly
- Added ground checking, the player will move down to reach the ground
- Performance tweaking in Protocol18, using lists instead of arrays
- Fix player look not properly skipped causing invalid location after
teleport
2015-11-30 15:30:49 +01:00
ORelio
72bd485e67 Add basic location handling
- Retrieve player location from the server
- Send back player location from the server
- Requires that a specific setting is enabled
- Should allow items to be picked up by the player
- May also trigger some anti chead plugins
2015-11-27 17:16:37 +01:00
ORelio
5038c3d475 Add regex settings for parsing chat messages
Allows user-defined regexes to be used instead of built-in chat
detection routines for matching messages on server using a non-standard
chat format. Built-in detection routines can be disabled using a single
setting, based on a contribution by ZizzyDizzyMC.
2015-10-22 22:17:15 +02:00
ORelio
29975da627 Merge onlyforlogin and enabled in proxy settings
The 'enabled' setting can now be set to 'login' for enabling proxy only
for logging in to the Minecraft account, and then connect to the server
directly without proxy. Useful when Minecraft login is blocked on some
network, but not Minecraft servers (port 25565) (original idea and
enhancement by ZizzyDizzyMC)
2015-10-22 20:56:08 +02:00
ORelio
a5bf62bc94 Merge pull request #99 from ZizzyDizzyMC/Indev
Ability to use proxy only for minecraft login
2015-10-18 18:04:50 +02:00
ZizzyDizzyMC
a65e632522 Fixed some things about pull request 99.
Changed LoginOnlyProxy to OnlyForLogin in settings, changed McTcpClient
so I was not using assignment operator. (Was a mistake anyway.)
2015-10-16 04:50:56 -04:00
ZizzyDizzyMC
0b870e2b49 Proxy Setting addition.
Added 'loginonlyproxy' option with true / false boolean options.
on 'true' only the minecraft login is redirected to the proxy.
Otherwise both the login and the server connection are routed though the
chosen proxy.

Provides a semi-workaround to issues #89 and #80 on ORelio/Indev
2015-10-15 21:20:29 -04:00
ORelio
4df5cb724a Fix copy and past mistake with XPBar setting
#95
2015-09-30 20:24:00 +02:00
ORelio
8bd130eb3a Add setting for hiding system/xpbar messages
Add settings for disabling:
- System Messages
- XP Bar Messages
Fix #95
2015-09-29 14:07:11 +02:00
ORelio
8560753949 Extend BrandInfo setting
Brand Information tells the server what client is being used to connect
to the server, possible values are the following:

- none (do not tell anything)
- vanilla (tells that you are using MC vanilla)
- mcc (tell that you are using MCC + version)

This will usually not do anything unless plugins developers use this
information for developing some MCC interoperability eg more chat
interactions instead of using GUIs. This could also be used to block
third party clients, that's why brand information can be disabled or
changed to vanilla.
2015-09-29 14:03:33 +02:00
ZizzyDizzyMC
1223c91d79 Added setting to make sending brand info optional.
sendbrandinfo=true|false was added so we can optionally send client
info.  Enabled by default.
Added sendbrandinfo into auto-generated ini file.
Edited Protocol18.cs to reflect this with an "if" statement before
SendBrandInfo() is called upon.

Fixed minor mistake of not adding chatbotmessages into Parsemode.
Parsemode.Default was being used.
2015-09-04 09:54:38 -04:00
ZizzyDizzyMC
385a1f99b1 Added another setting.
Added
vanillaandfactionsmessages setting that enables / disables detection of
vanilla / factions public chat messages.
Setting has been added to the auto-generated MinecraftClient.ini and has
been commented with respective chat format of "<user> message" and
"<*faction user>: message"
Clause added to ChatBot.cs that makes use of the new setting.
2015-09-04 09:16:28 -04:00
ZizzyDizzyMC
93aae2d467 Commented Auto-Generated MinecraftClient.ini
Added example chat format in the ini comments.
Further cleaning up my own mistakes as well.

Note: I'm learning still. Getting better AND fast though.
2015-09-04 00:15:02 -04:00
ZizzyDizzyMC
1abb46b8ca Added / Cleaned Enable features of Chat Messages 2015-09-04 00:00:02 -04:00
ZizzyDizzyMC
b233b60aba Default acceptance of Hero-Chat public messages changed.
Changed from default of disabled to enabled. *True*
2015-09-04 00:00:00 -04:00
BuildTools
35365a4b80 Revert "Revert "Added a new PM regex""
This reverts commit 450cb4c6b9.
2015-09-02 23:01:46 -04:00
BuildTools
450cb4c6b9 Revert "Added a new PM regex"
This reverts commit 88c9605e94.
2015-09-02 23:01:30 -04:00
BuildTools
88c9605e94 Added a new PM regex
Added
[someone @ me] message
so that remote control could be used on more servers.

Added back Hero Chat Messages with a default config option of;
herochatmessagesenabled=false
which safely disables it for everyone and has to be explicitly enabled
for it to goof anything up.
How this happened was me downloading the "source" from minecraft forums
and modifying that source then trying to merge it back to the main
github fork of mine.
2015-09-02 23:01:01 -04:00
ORelio
3e2622fbb7 Various C# Script improvements
Move handling code in a separate file
Add caching ability for low-power devices (rpi..)
Use a distinct API with MCC.MethodName()
Stop script execution only on specific API calls
2015-08-23 18:51:29 +02:00
ORelio
f5a67090c2 Add comments for server IP parsing
Dot is used for determining of the given IP is a server alias or a
direct ip address or domain name. See #83
2015-07-05 20:53:35 +02:00
ORelio
e29b4ee545 Add support for C# script extensions
- Allow defining function for use into the script
- Allow defining a ChatBot for loading it into MCC
- Improve sample script and add more examples
- Todo add new documentation into the readme file
2015-06-21 18:45:43 +02:00
ORelio
3ce91188c7 Add support for C# scripts in scripting bot
- Now scripts can also be written in C#
- C# scripts can access ChatBot API
- Add more methods in ChatBot API
- Add an example of C# script file
- Coding style fixes: method names ucfirst
2015-06-20 22:58:18 +02:00
ORelio
0029561135 AutoRespond improvements
- Add improvements from pull request #76
- Add support for regexes instead of simple matches
- Add support for internal MCC commands eg script
- Add support for flexible INI file containing matches

TODO: Testing, sample INI file, proper documentation
2015-06-11 23:37:20 +02:00
ORelio
b07091e3dd Merge branch 'Indev' of https://github.com/ORelio/Minecraft-Console-Client into Indev 2015-05-26 19:03:50 +02:00
ORelio
f7c729835a Add delay between sends of long messages
When a very long message is typed, a delay of 2 seconds is by default
used before sending parts of the long messages. The delay can be
modified or set back to 0 in configuration file, if necessary.
2015-05-26 19:01:39 +02:00
Bancey
43fa3fb4b4 Auto Respond Bot
This bot allows users to add a bot that can detect and respond to
certain text.

The bot can be enabled/disabled via the ini file. (disabled by default)
The bot uses 2 files to let the user set what to pickup and what to
respond.
2015-05-19 15:36:20 +01:00
ORelio
2c31efd0c9 Add server IP in default window title
Unix-Tool-Like syntax : user@host
Window title can be changed or disabled in INI file
2015-03-28 13:39:56 +01:00
ORelio
05a141c50d Improve offline interactions
- Add prompt for Minecraft version
- Improve offline-mode command prompt
- Fix default value on parse error in protocol handler
- Fix failed to connect not showing offline prompt
2015-03-25 22:50:20 +01:00