Commit graph

438 commits

Author SHA1 Message Date
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
Pokechu22
9fefcb40ef Send MC|Brand information upon joining the game 2015-08-22 14:26:56 -07:00
ORelio
344749ead2 Add 'accepted' response pour resource packs
An 'accepted' response is sent by vanilla minecraft before sending
'successfully loaded', so let's do the same thing here. See #91
2015-08-21 17:22:09 +02:00
ORelio
a0683e1c46 Add '/' as valid separator for detecting 1.8 proxies
Should work with "Requires 1.7/1.8 (protocol v4)"
server info, reported by Yoann166.
2015-08-21 17:16:31 +02:00
ORelio
c1d2cbd84c Merge branch 'Indev' of https://github.com/ORelio/Minecraft-Console-Client into Indev 2015-08-21 16:56:51 +02:00
ORelio
86711adba8 Fake resource pack acceptance
Some server requires that players install a resource pack, and will kick
them if they doesn't. With this new feature MCC will automatically respond
"successfully loaded" for every "resource pack send" packet it receives.
Suggested by Yoann166 in issue #91
2015-08-21 16:54:24 +02:00
Pokechu22
295dfe717e Fixed issues with passwords containing unicode special characters.
The main fix is the change to ProtocolHandler's jsonEncode method.  Previously,
it used 'char.IsLetterOrDigit' to see if it needed to be escaped, but some
chars, such as "Ð", count as a letter but still need to be escaped.  The fix is
to check if it's in the right range, rather than using that method.

There's also some changes to those methods for performance and clarity reasons.
Most of this is using a StringBuilder rather than appending to the string.  Not
too important, but it makes things clearer.
2015-08-17 11:11:09 -07:00
ORelio
de4322458a Add 'other' messages support in AutoRespond 2015-08-02 12:20:51 +02:00
ORelio
12b94996c7 Add joshbean39's chat formats 2015-07-31 12:23:13 +02:00
ORelio
67f17cbb3e Remove packet debugging code 2015-07-30 17:32:42 +02:00
ORelio
3a760240e4 Move 1.7 handling into 1.8 handler
Minecraft 1.7 handler was pretty similar
to 1.8 handler and lacking some features
such as packet prefetching.
2015-07-30 16:47:58 +02:00
ORelio
729960d4a3 Add 1.8.8 as supported version 2015-07-30 12:37:29 +02:00
ORelio
80b44228f8 Further autocompletion fixes
Refactor code as splitting is now useless
2015-07-23 21:39:41 +02:00
ORelio
c88d150976 Fix Offline BungeeCord 1.5.2 requiring encryption
Vanilla minecraft encryption can be unofficially bypassed on pre-1.7
minecraft when connecting to offline-mode servers (now it IS officially
bypassed in offline mode in 1.7+), but BungeeCord 1.5.2 requires
encryption even in offline-mode, so enable encryption even in
offline-mode. Bug report by xp9kus.
2015-07-23 21:38:58 +02:00
ORelio
1e801ad415 Fix tab autocompletion when no result is found
When no result is found, tab-complete result should be ignored. Bug
report by c0dei.
2015-07-21 16:46:41 +02:00
ORelio
546119a334 Fix ] password typing on QWERTY keyboards
Oem6 key was incorrectly ignored. Fix #47
2015-07-17 23:00:45 +02:00
ORelio
a6a9814163 MC 1.7: Skip potential extra data in tab-list items
See issue #84 for more info
2015-07-07 22:43:27 +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
f076e1f512 Add argument passing for C# scripts
script files with spaces in filename will need double quotes when
calling them eg /script "my script.txt" instead of /script my script.txt
2015-06-25 12:12:59 +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
a6b3bf0481 AutoRespond tests and fixes
- Automatically add [BotName] tags to log lines
- Fix case handling and actionPrivate used for public messages
- Add a sample file for basic and regex matches
2015-06-21 16:40:13 +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
3224c59eab Remove padding mechanism
Not needed anymore since proper encryption is now used under Mono
2015-06-19 19:40:18 +02:00
ORelio
67affc6270 Fix 1.7+ server list ping by properly parsing Json
Separate Json and ChatParser classes
Use Json parser for retrieving Json fields
Will avoid wrong "name" field from being used
2015-06-19 19:29:23 +02:00
ORelio
a7f0897f09 Add 1.8.5 - 1.8.7 as supported versions
+ Improve wording: answer -> respon[d|se]
2015-06-19 18:42:24 +02:00
ORelio
c957ed0efd Remove invalid disconnect packet (2)
Forgot to apply the same change to Protocol17, see #45
2015-06-16 10:59:18 +02:00
ORelio
365af032ad Remove invalid disconnect packet
... use TCP connection closing instead. See #45
2015-06-14 21:43:24 +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
840ac01dc5 Fix crash on empty player list updates
Player list updates on MC 1.8 handler did not take into account the
amount of items in the list and were only processing the first item,
including when there wasn't any item to process. Unfortunately some
weird servers were sending useless empty tab-list updates, causing a
crash. Should fix issue #78 and forum posts 1267, 1269, 1284. Thanks
dbear20, link3321, gerik43, Darkaegis, k3ldon and Ryan6578 for their bug
reports! :)
2015-06-03 12:00:25 +02:00
ORelio
80b468b301 Add Mention to Mozroots in Readme file
See issue #77
2015-06-01 08:33:53 +02:00
ORelio
53156bdf98 Normalize AutoRespond bot
Move FromFile method from bots to ChatBot class
Rename file and class, removing space and underscore.
2015-05-26 19:17:37 +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
ORelio
fa626d4641 Merge pull request #75 from Bancey/Indev
Add AutoRespond Bot
2015-05-19 23:36:16 +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
5b662e2d07 Fix HeroChat public messages treated as private
See issue #63 - Also includes minor fixes and optimizations
2015-05-18 16:15:58 +02:00
ORelio
dd5e2f8e39 Rewrite translation rule processing
Improve speed and handling of %1$s tags
Fix prompt in ConsoleIO not being reset to gray
2015-05-17 21:45:00 +02:00
ORelio
93d58a8d81 Ignore invalid UUIDs for tab-list
If the server is sending invalid UUIDs, use an empty UUID instead
2015-05-17 21:10:01 +02:00
ORelio
834e446a74 Add 1.8.4 in supported version list
+ minor fixes to ConsoleIO
2015-05-13 10:59:46 +02:00
ORelio
33b84584aa Indentation change for Fix concurrency[..]
Indentation was intentionally left the same in previous commit for
clearer diff, this commit only fixes code indentation from last commit
2015-05-10 18:59:00 +02:00
ORelio
3376247826 Fix concurrency in ConsoleIO
Fix concurrency issues by using proper locks
2015-05-10 18:57:33 +02:00
ORelio
72498a6756 Fix ping failure causing double failure handling
"Failed to ping this IP" also caused "Failed to determine server
version" error, calling HandleFailure() twice.
2015-04-22 18:56:43 +02:00
ORelio
57c66c82d7 Merge error handlers
- Merge all error handling code into one method
- Fix ConsoleIO not clearing the line being typed upon reset
- Update console title upon logging in to the server
- Pass "failed to ping this IP" to AutoRelog (thx doranchak)
2015-04-22 10:27:53 +02:00
ORelio
6261e7adb7 More startup error handling
- Pass minecraft login failure message to AutoRelog bot (suggestion by
doranchak)
- Fix NullReferenceException in McTcpClient caused by SocketException in
ProxyHandler
- Refactor error handling code in Program.InitializeClient()
- More detailed error messages on network errors.
2015-04-20 17:26:16 +02:00
ORelio
791ecba454 Add timeout for server ping
Thanks doranchak & FantomHD (post no.1193)
+ Add missing doc for MinecraftVersionPrompt
2015-04-14 15:36:51 +02:00
ORelio
2cf46c0487 Fix crash when resizing terminal
Bug report by doranchak
2015-04-11 12:30:36 +02:00
ORelio
ea17ec87f1 Better exception catching
- Better catch in proxy handler
- Better catch in StartClient (thx doranchak)
2015-04-06 11:42:43 +02: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
ORelio
7757d5ae03 Upgrade login/session timeout to 30 seconds
Might help when login/session servers take a long time to respond.
2015-03-25 22:14:38 +01:00