Commit Graph

1765 Commits

Author SHA1 Message Date
md_5
8490d611bf [#1717] Perform a copy if Netty isn't using a direct address for any reason. 2016-02-05 12:50:42 +11:00
Thinkofdeath
a0f2c42d38 Clear the address cache entry when a connection fails
Should help solve the issues caused by mojang swapping the ip address of
the session server.
2016-02-05 10:19:31 +11:00
Jedediah Smith
40c0618a3a Fix NPE from duplicating TranslatableComponent 2016-02-04 23:12:19 +00:00
BlackHole
fa3678bcdd Add new 1.8 chat features 2016-02-04 23:11:35 +00:00
md_5
e556fd7150 Add Connection.isConnected()Z API.
Idea from kamcio96 in #1693
2016-02-05 10:09:47 +11:00
md_5
841c81cdc4 [#1714] Make a copy of the main Minecraft buffer as EntityMap.rewriteVarInt may require more bytes than available. 2016-01-24 19:45:02 +11:00
md_5
052131c1fa Reduce amount of memcpy within proxy pipeline. 2016-01-24 11:22:39 +11:00
md_5
79dbdea107 Use more realistic cipher test sizes and counts. 2016-01-16 14:03:47 +11:00
md_5
7fb1f4b81f Replace gitdescribe with Scriptus. 2016-01-16 13:52:53 +11:00
md_5
255d7fde9a Ensure native zlib actually loads. 2016-01-16 13:33:09 +11:00
md_5
7907610eeb Compatability and benchmark fixes for native code. 2016-01-16 13:29:50 +11:00
kamcio96
83e27f07e6 Use static instances of EntityMap 2016-01-16 12:44:32 +11:00
md_5
5cff0b2171 Remove redundant synchronization on ServerConnection.disconnect 2016-01-16 12:33:42 +11:00
md_5
2c86592ecd [#1649] Don't parse disconnect reason for servers.
Reported by @kamcio96
2016-01-16 12:29:13 +11:00
md_5
f5552963b8 Update Netty and enable EPoll transport. 2016-01-16 11:37:17 +11:00
md_5
1182affa09 Rewrite host parsing to account for IPv6. 2016-01-14 09:52:16 +11:00
Tux
a1895c556f Make BoundedArrayList follow the old behavior.
Unit tests have been included.
2016-01-11 14:09:07 +11:00
md_5
aa214c0b54 [#1695] Use BoundedArrayList to cap list size for REGISTER channels. 2016-01-10 19:00:00 +11:00
Luuk Jacobs
81bd3b5f71 Fix typo in ClickEvent.java 2016-01-05 09:14:34 +11:00
kamcio96
b6e26e0c09 Load NativeCode manually, not in constructor.
Bungee will call load method from main thread
https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/BungeeCord.java#L202
2015-11-19 08:42:01 +11:00
Joseph Hirschfeld
19f2e7b13e DNS IPs should only be cached for 1 minute. 2015-11-12 12:58:18 +11:00
xxyy
ba448b5670 Add configurable proxy command logging.
This commit adds a config switch that allows users to turn off
 the logging of proxy commands. It is set to off by default to
 prevent unwanted log spam and keep current behaviour.
Log proxy commands

This commit changes the PluginManager to print a message to
console and the log when a proxy command is executed.
This may assist with debugging and miscellaneous
investigations.
2015-10-26 20:59:53 +11:00
md_5
013320fd9e #1852: Fix packet compression when BungeeCord and the server are set to different compression levels. 2015-09-16 19:44:55 +10:00
md_5
8a1030e21c #1583: Two additions to console behaviour:
1) Stop trying to read anything if the console is hooked up to /dev/null
2) Don't even bother in the first place if --noconsole is used as an argument.
2015-09-16 15:09:40 +10:00
Thinkofdeath
c626254825 Only enable compression for 1.8 clients 2015-09-13 08:59:42 +01:00
md_5
4e94c278da [#1567] Let BungeeCord dictate the network compression threshold. 2015-09-13 09:29:39 +10:00
jfr
06ad0f9310 Reorder PlayerJoinEvent / UpstreamBridge initialization.
Placing the PlayerJoinEvent in front of the Upstream Bridge handling prevents us from actually accessing the target server in PostJoinEvent handlers.
2015-09-07 18:26:41 +10:00
md_5
c4a3a052d7 Update to Netty 4.0.31.Final 2015-09-06 12:11:41 +10:00
md_5
7ec1a1aa4e Fix / clarify behaviour of matchPlayer. 2015-09-05 13:42:33 +10:00
Tux
59208aad86 Improve EventBus by removing read locking.
This is primarily done by using ConcurrentHashMap, which has lock-free reads and thread-contention-based writes. Only one thread at a time can register threads, however, as baking events isn't thread safe (and there's no reason to make it thread-safe anyway).

My own benchmarks indicate 1.4-2.2 million operations/ms throughput and approximately ~1ns/event post for four threads posting events.
2015-09-05 13:33:18 +10:00
zml
bd07be8772
chat: Correct placeholder handling in translatable
This change makes TranslatableComponent still scan a
translation string for placeholders, even if the translation string
itself is being used (rather than a value found from the
ResourceBundle). This matches vanilla behavior and allows plugins that
use this system with serverside translations and other custom
translation systems to send output to the server console correctly.
2015-08-30 14:50:37 -07:00
pvmac2194
b3d15d53d6 Add <server> in the usage of /send
Just a small cosmetic fix that shows server owners that this argument exists.
2015-08-14 18:31:28 +10:00
Thinkofdeath
6343416c0c Update the PluginMessage packet to respect the protocol limit changes in 1.8 2015-07-16 23:07:30 +01:00
kamcio96
81d1c46a0d Support uuid in config.yml 2015-07-13 19:46:15 +10:00
md_5
6e5132f914 #1537: Allow /send <server> <server>.
If the first argument is a server, send all players from that server. Servers take priority in the case a player and server share a name.
2015-07-13 19:32:12 +10:00
Daniel Naylor
f3c14cf064 Fix telling newer 1.7 Forge clients that they are outdated. Fixes #1476
* Only check the version of FML if we are running Minecraft 1.7.10 - 1.8 clients are always valid.
* If the version of FML that is reported is 7.10.99.99 - report the Forge version instead.
2015-07-10 12:33:22 +10:00
Marc Baloup
a3a31fd2dd Correct handling of command's parameters for tab completion
Hi :)

There is some problem with TabExecutor and I think I found the problem.

Exemple :
/send <playerName|all|current> <targetServer>
When I write "/send " (with trailing space) and press Tab, I don't have any suggestion. But when I wrote the first character of an online player, it suggest all players which start with this same character (expected behavior)

The problem is the same when I wrote "/send marcbal " (with trailing space). When I press Tab key, I have "marcbal" suggested instead of servers suggestion. (the result is "/send marcbal marcbal"). But when i wrote the first character of a server name, it suggest all servers which start with this same character (expected behavior)

other exemple : there is 2 players online in the same server : me (marcbal) and marcbaleeee (for exemple)
when I wrote "/send marcbal " (with trailing space) and I press Tab key, I have the suggestion of the 2 player names.

I deduced that the onTabComplete() don't care about the trailing space of the command string (exemple : "/send marcbal ") and probably a problem when splitting (removing last trailing empty args), so, the onTabComplete method try to complete the first argument "marcbal" instead of the second empty argument.

To split the command line, you use the method Pattern.split(CharSequence) that remove trailing empty strings http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#split(java.lang.CharSequence)
So, we should use the other split() method, with a second argument which has to be a negative integer value. (see Javadoc)

PS : Sorry for my bad english x)
2015-07-10 12:28:26 +10:00
md_5
cc3a8c067e Check channel active before adding handlers. #1489 2015-06-06 18:41:54 +10:00
Joe
918d7229c2 Fix Deadlock in EventBus post #1493 2015-06-05 13:03:43 +10:00
sha-2
6c4e684de9 Move the compiler configuration to properties 2015-05-31 10:51:49 +10:00
minecraftshamrock
9cf57ca929 Fix AsyncEvent callback triggering.
Before this, two concurrent postCall() and completeIntent() calls might
cause the callback to be called more than once.
2015-05-18 20:22:32 +10:00
Adam
70564d9f44 Fix BaseComponent.duplicate() ignoring extra 2015-05-18 20:18:57 +10:00
Nathan Poirier
8622cf3af4 Fix BadPacketException handling It is catched by DecoderException and was not processed correctly by HandlerBoss So the console was spammed when that exception is thrown 2015-05-18 20:18:19 +10:00
Nick
5236dd301a Use an actual ArrayList when creating a TextComponent with extras.
Arrays#asList returns a java.util.Arrays.ArrayList which does not support adding more elements.  This previously broke BaseComponent#addExtra.
2015-05-18 20:16:45 +10:00
md_5
ddfd76ebda Make MinecraftDecoder a MessageToMessageDecoder 2015-05-18 20:16:12 +10:00
Thinkofdeath
93959cab4b Only force remove the player from 1.8 client's tab list 2015-05-10 22:51:14 +01:00
Thinkofdeath
585ab4f453 Readd the delay removed in f9773a69c3 2015-05-08 20:41:21 +01:00
Thinkofdeath
76052b92d3 Don't send a Kick during the STATUS protocol as it doesn't support it 2015-05-08 20:32:12 +01:00
Thinkofdeath
f9773a69c3 Don't send a kick to the server on disconnect
This was dropped from the protocol in 1.6 and was left in bungee by
mistake
2015-05-08 19:39:22 +01:00
Tux
88e71ead05 Add reset() and retain() methods to ComponentBuilder.
This method is simple: it resets the current part to default settings, keeping only the current text. It therefore acts like the old ChatColor.RESET
code. The retain method allows for more control over what is reset.

Add a test to verify proper functioning of reset()/retain().
2015-05-06 09:57:48 +01:00