39 Commits

Author SHA1 Message Date
Dylan K. Taylor
b7973ef782 Merge branch '3.5' 2019-02-05 16:58:34 +00:00
Dylan K. Taylor
5da48f429f Fixed some remaining one-line field declarations, added type docs 2019-02-05 14:03:27 +00:00
Dylan K. Taylor
2dee7e9e0f Properly handle Query packet errors 2019-01-17 22:22:53 +00:00
Dylan K. Taylor
adc1069ed2 Merge branch '3.5' 2019-01-04 23:28:44 +00:00
Dylan K. Taylor
4b9a142a5d Import global functions and constants for enhanced performance
This is better for performance because these then don't need to be reevaluated every time they are called.

When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.

However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
3ebd7e8ba6 Add network-wide API to filter raw packets by regex, stricter validation for Query 2018-12-28 16:30:52 +00:00
Dylan K. Taylor
4d1e2d1b3a Rename SourceInterface -> NetworkInterface
SourceInterface doesn't make sense really...
2018-07-18 11:03:21 +01:00
Dylan K. Taylor
25022b3144 Merge branch 'release/3.1' 2018-07-13 12:38:41 +01:00
Dylan K. Taylor
65e44364e5 Added some debug for raw packets and Query handling 2018-07-13 10:07:11 +01:00
Dylan K. Taylor
2907de81ad Apply typehints to more general pocketmine\network namespace 2018-07-05 13:36:23 +01:00
Dylan K. Taylor
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
Dylan K. Taylor
c4c6c58615 Added some missing typehints 2018-06-10 17:18:55 +01:00
Dylan K. Taylor
5e91c05424 Server::getIp() now returns 0.0.0.0 if the IP string is empty 2018-05-10 10:25:44 +01:00
Dylan K. Taylor
d6d47feda9 Query: Send responses to the source interface only, instead of all the things
who the fuck wrote this shitty code?
2018-02-27 13:23:01 +00:00
Dylan K. Taylor
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
SOF3
e913b16804
Fixed some lines indented with 4 spaces rather than tabs 2016-10-03 00:58:34 +08:00
SOF3
6fc435da0e
Imports rearrangement 2016-10-03 00:43:46 +08:00
Tux
8e9a078ff9 Use built-in random_bytes functionality 2016-09-06 11:47:58 +01:00
Shoghi Cervantes
51062940c5
Implemented QueryRegenerateEvent as base for other interfaces 2015-05-26 01:17:34 +02:00
Shoghi Cervantes
3b6e10b759
More langs :D 2015-04-11 14:59:15 +02:00
Shoghi Cervantes
8601405a88 Fixed CPU leak 2014-10-31 21:07:00 +01:00
Shoghi Cervantes
350cee3d41 Added Event allocation pool, updated SPL with Class::onClassLoaded() 2014-10-28 10:47:40 +01:00
Shoghi Cervantes
34946faf94 Remove errors from Utils::getRandomBytes() 2014-10-19 13:44:38 +02:00
Shoghi Cervantes
0b79d74a2f Implemented QueryRegenerateEvent 2014-10-07 11:02:05 +02:00
Shoghi Cervantes
eab86f5f90 Replaced array() with [] 2014-08-28 17:04:22 +02:00
Shoghi Cervantes
60ea4d0e96 Removed hardcoded Server name from source 2014-08-22 18:31:17 +02:00
Shoghi Cervantes
db7222976e Code cleanup 2014-08-21 17:26:41 +02:00
Shoghi Cervantes
2f9494ed52 Fixed crash caused by a race condition on Query 2014-08-15 16:07:04 +02:00
Shoghi Cervantes
1fab6bd589 Added settings.query-plugins setting 2014-07-10 17:24:12 +02:00
Shoghi Cervantes
e6c510e7fd Fixed #1595 Undefined variable on QueryHandler 2014-07-10 13:15:24 +02:00
Shoghi Cervantes
892119f791 Updated RakLib version, Query works again 2014-07-06 01:19:09 +02:00
Shoghi Cervantes
7bd6f2ed91 Added Logger interface, threaded MainLogger and updated PluginLogger 2014-05-28 23:46:56 +02:00
Shoghi Cervantes
c0de004472 Moved binary methods from Utils to Binary 2014-04-07 13:52:01 +02:00
Shoghi Cervantes
502c27273d Moved Level methods to Server 2014-04-02 02:58:20 +02:00
Shoghi Cervantes
7e9304a0c9 Formatting 2014-04-01 19:48:28 +02:00
Shoghi Cervantes
b4cc3bbd43 Added /op, /deop, /kick, OfflinePlayer, moved player list to Server instead of static Player 2014-04-01 19:46:48 +02:00
Shoghi Cervantes
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00