Commit graph

324 commits

Author SHA1 Message Date
ORelio
66d57b0ce6 Cycle through tab-complete results
Allow cycling through tab-complete options sent back by the server by
pressing TAB multiple times in a row. Fix #148
2016-05-14 11:51:02 +02: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
5e6f4d3af9 Add 1.9.3 and 1.9.4 2016-05-11 23:00:40 +02:00
ORelio
67fc431d4a Add location getter and setter location in ChatBot
See #146
2016-05-04 23:47:08 +02:00
ORelio
0b32bb5a0f Differenciate 1.9.1 and 1.9.2
See #135
2016-03-31 22:16:26 +02:00
ORelio
e2bf4e3063 Add MC 1.9.1 and 1.9.2 as supported versions
See #135
2016-03-31 19:25:52 +02:00
ORelio
56d2c201f9 Fix uninitialized AutoRelog for static errors
Kick message list wasn't loaded.
Bug report by Cat7373
Fixes issue #134
2016-03-21 13:26:45 +01:00
ORelio
75bbeb0b4b Fix write conflicts for disk session cache
Will use random waits when a write conflict is detected.
This should allow several clients to write at the same time.
Inspired from CSMA/CD (ethernet way of handling collisions).

Bug report by TNT-UP @ MC Forum post no.1684
2016-03-21 11:03:31 +01:00
ORelio
96e4c589cd Update README file 2016-03-21 10:22:05 +01:00
ORelio
e8097206d0 Disable terrain and movements when not handled
Related to #131
2016-03-12 11:01:31 +01:00
ORelio
199bbbabeb Add /move get for getting coordinates
Suggested in #129
2016-03-11 10:52:19 +01: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
ORelio
d44a76e82c Fix Tab list item parsing for 1.8 & 1.9
Went unnoticed until, well, now.
2016-03-08 18:03:08 +01:00
ORelio
82e92f984b MC 1.9 : Add missing compatibility list entries 2016-03-05 19:33:44 +01:00
ORelio
a82c6823af Add support for Minecraft 1.9
Currently no terrain handling but anything else should work.

Related: #125
2016-03-05 19:13:45 +01:00
ORelio
578a6170ef Lower .NET requirement for Session Token
Changing constructs that weren't .NET 4.0 compliant.
Also fix \n to \r\n line returns in ProtocolHandler.cs
2016-03-05 19:10:13 +01:00
ORelio
0fbefb5068 Merge pull request #124 from initsuj/Indev
Add session caching by initsuj
2016-03-03 12:21:14 +01:00
ORelio
fc9adf902e Add sample script with world access
See #123
2016-03-03 12:07:18 +01:00
Justin Slauson
98b3ce7304 added timer to reduce file access collisions and cleaned some text up. 2016-03-02 19:08:24 -07:00
Justin Slauson
fec1687cb7 Updated docs and cleaned up. 2016-03-02 18:16:19 -07:00
initsuj
57c53be09f caching works. needs documentation and testing 2016-03-02 17:11:15 -07:00
initsuj
75f2f738a2 Added clientID to login call.
Updated project file to include Cache namespace.
2016-03-02 07:25:09 -07:00
Justin Slauson
64606c128f new token requests implemented. testing a success response is proving difficult. invaliding the token in a way that it can be refreshed is not documented. 2016-03-01 21:15:17 -07:00
Justin Slauson
fa2dbfef1a clientToken param info added to docs 2016-03-01 20:00:02 -07:00
Justin Slauson
7230cd726b validates with saved clienttoken 2016-03-01 19:58:04 -07:00
Justin Slauson
2861be757f clienttoken is created (if not passed) and added to auth request, then returned 2016-03-01 19:53:35 -07:00
Justin Slauson
8c065320c2 validates token successully 2016-03-01 19:40:54 -07:00
initsuj
1a41c42ba9 Cache settings are written and parsed. 2016-03-01 19:20:05 -07:00
ORelio
b10e3e8521 Ignore Forge messages once Forge login is complete
In an attempt at fixing #117
2016-02-27 18:01:58 +01:00
ORelio
a52fb61358 lastMessageSentTime does not needs to be optional 2016-02-27 17:59:08 +01:00
ORelio
7ff9d3bb37 IsPrivateMessage(): Case insensitive 'me' for PM 2016-02-27 17:56:47 +01:00
Pokechu22
5c8f66dbd0 Fix broken new line in settings
Fixes #115.
2016-02-26 18:01:05 -08:00
Pokechu22
0617629570 Fix two bugs with 1.7.10 protocol
The first bug is that the list isn't cleared in some cases, meaning new packets get data from the previous packet if it isn't read fully.  Most commonly, this happens with a plugin channel message.  The second bug happens because lists don't throw IndexOutOfRangeExceptions, but instead throw ArgumentOutOfRangeExceptions.  This caused the catch for ignoring message types to not occur, instead causing the client to crash.  This only happens in 1.7.10, where the message type is not included.

Most likely, these changes will fix the bugs seen in #114 and #117, although they may be caused by other bugs.
2016-02-26 18:00:27 -08:00
initsuj
aed891e3c8 Fixed IndexOutOfRangeException when bot is unloaded on update 2016-02-23 11:19:14 -07:00
Pokechu22
6d4ec86619 Add an "AfterGameJoined" method to ChatBot.cs.
Since messages can't be sent in Initialize(), a method that's called when the chat bot can first send messages is needed.  This method is called when the login completes or when the bot is loaded if the login is already been completed.
2016-02-07 14:55:29 -08:00
Pokechu22
1ea8f119d9 Give ChatBots access to plugin channels.
Chatbots may find it useful to send messages over plugin channels.  This allows REGISTERing, UNREGISTERing, and sending over plugin channels, with built-in checking if the server also registered the channel (which can be disabled by the bot if needed). Unused channels are UNREGISTERed when a bot is disabled.
2016-02-07 14:55:10 -08:00
ORelio
bdbd8ab0b8 Remove debug printing line in ChatParser
See #107
2016-01-31 19:09:08 +01: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
14b8895716 Add regex access for C# scripts
Suggested by _initsuj
2016-01-27 00:22:20 +01:00
ORelio
67939774ba Chat formats : Catch Argument out of range
Whas happening for chat messages starting with '<' but never
ending with '>'. Bug report by Aderpace.
2016-01-26 10:35:49 +01:00
ORelio
d36647af3e Add GetWorld() API method for ChatBots 2016-01-16 17:52:09 +01:00
ORelio
71277362be Add timeout when calculating unreachable path
5s timeout, assuming destination is unreachable otherwise.
2015-12-17 17:40:26 +01:00
ORelio
902b04656c Fix pathfinding to coordinates
- Now possible to walk to given coordinates
- Fix sending location before it is received
2015-12-13 21:58:55 +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
00131de08b Fix CanHarmPlayers in Material.cs
- Add flowing lava
- Remove stationary water

Reported by Pokechu22 :)
2015-12-10 18:33:01 +01:00
ORelio
49702e30b8 Add block material database
Taken from Bukkit's Material class, with credits.
Allows to know types and properties of blocks.
+ Use database for "is solid" checks
+ Add "can harm players" method
+ Faster movements, falling seems natural now
+ Shorter error message when ping failed
2015-12-09 23:04:00 +01:00
ORelio
5d8d42e3d1 Terrain: Fix coordinate parsing (negative coords)
- Optimize readNextUShortsLittleEndian network reading method
- Various coordinate computation issues, negative chunk offsets
- Properly parse negative coordinates for block change events
- Properly reach ground if less than 1 block over the ground
2015-12-08 00:34:40 +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