Commit graph

73 commits

Author SHA1 Message Date
ORelio
5654871a57 First attempt at Realms list retrieval
> See #51 - Realms Support
+ Catch exception while retrieving player head
2015-11-27 16:52:45 +01:00
Pokechu22
3a19de82ae Finish forge hand shaking before enabling the chat prompt. 2015-10-25 12:20:38 -07:00
Pokechu22
fb87de1ff5 Fix compatability with Feed The Beast servers
More percisely, use varshorts for the length of the 3F packet,
as forge makes it longer.  Only really matters if a bazillion
mods are installed, which they are with FTB.
2015-10-25 11:51:53 -07:00
Pokechu22
b746b5612b Only add \0FML\0 to the IP if forgeinfo is not null (+ whitespace fixes) 2015-10-24 22:56:35 -07:00
Pokechu22
77277bcf84 Add SendPluginChannelPacket to the IMinecraftCom interface. 2015-10-24 22:35:17 -07:00
Pokechu22
7c8e856392 Fix connection to forge 1.7.10 servers.
This includes making sure plugin channels have their packet.
Also, it fixes a mistake in #92, where brand info doesn't send
length in 1.7.10 (same channel issue).  Finally, there's only 1
registry sent to the client in 1.7.10.
2015-10-24 21:17:28 -07:00
Pokechu22
ad38154f8f Full forge (1.8) connection support! 2015-10-24 19:54:38 -07:00
Pokechu22
c1c1c10d26 Relocate forge handshake code into the main packet handler.
Also, handle handshake reset.
2015-10-24 15:06:22 -07:00
Pokechu22
b154639a6b Handle forge handshake up to mod list sending. 2015-10-24 15:06:20 -07:00
Pokechu22
7cc87d8e71 Detect and store the list of forge mods. 2015-10-24 15:06:13 -07:00
Pokechu22
f67a3e3384 Attempted to add basic forge support. This does not work, but it's a start. 2015-10-24 15:06:05 -07: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
e8a8ca4e7a Catch exception while moving cursor in ConsoleIO
- ConsoleIO bug report by ibspa.
- Also: NullReferenceException when closing connection
2015-10-20 22:55:29 +02:00
ORelio
b25a665c82 Delay BrandInfo sending
Implement Game Join event and send Brand Info only when server
acknowledged game join, as ZizzyDizzyMC did before, else server may
generate an invalid packet error because it was still in "login" mode
and not in "playing" mode. Fix second issue in #95
2015-09-30 20:01:57 +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
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
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
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
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
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
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
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
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
ea17ec87f1 Better exception catching
- Better catch in proxy handler
- Better catch in StartClient (thx doranchak)
2015-04-06 11:42:43 +02: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
ORelio
e3c38ed6ac Update version info for 1.8.2 release 2015-03-11 19:58:39 +01:00
ORelio
2408b51d28 Fix BungeeCord 1.8 (2nd attempt) 2015-01-31 11:21:06 +01:00
ORelio
391eca102c Add 15 seconds timeout to session and login
Add AutoTimeout class for use on login and session requests.
Bug report by GamerCorey7.
2015-01-27 20:38:59 +01:00
ORelio
4752094f1f Fix server version detection for Bungeecord 1.8 2014-11-11 12:44:37 +01:00
ORelio
2dec21ddc7 Add Minecraft 1.8.1 in supported version list
Allows support for version=1.8.1 in config file
2014-11-11 12:36:15 +01:00
ORelio
8e458f7ab9 Add /list support in Protocol16
Removed fallback to server /list command
2014-11-11 12:35:08 +01:00
ORelio
8d16f1ec89 Add /list support in Protocol17
Fake UUID using md5(username) since protocol17 does not have UUID in
player list item packet
2014-11-10 20:56:12 +01:00