Commit Graph

3796 Commits

Author SHA1 Message Date
Rsl1122
cafcb61cf5 Added average ping to sessions on /player page
- This might increase memory usage when viewing player page by a little
- This might increase time it takes to get player page json
- 'avg_ping' is not always present for a session

Affects issues:
- Close #864
2019-11-07 13:41:53 +02:00
Rsl1122
4bcf2141d9 Implemented median first session length
Affects issues:
- Close #1211
2019-11-07 13:01:23 +02:00
Rsl1122
f641c44bf2 Added ACTIVE_SESSION to Player placeholders
Playtime was not being updated live for the player placeholders because
the Active session was not added in the PlayerContainer before
calculations.

- Added the active session (if present) to the placeholders
- Updated session state when it is fetched from the cache (world time)

Affects issues:
- Close #1209
2019-11-07 12:55:57 +02:00
Rsl1122
97094a9e03 Added warning about 0.0.0.0 as address
Affects issues:
- Fixed #1214
2019-11-05 12:20:17 +02:00
dependabot-preview[bot]
0bb383acd9 Bump slf4jVersion from 1.7.28 to 1.7.29 in /Plan
Bumps `slf4jVersion` from 1.7.28 to 1.7.29.

Updates `slf4j-nop` from 1.7.28 to 1.7.29
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

Updates `slf4j-api` from 1.7.28 to 1.7.29
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-04 13:26:58 +00:00
Risto Lahtela
f5a1d441fd
Update CONTRIBUTING.md 2019-11-03 13:46:13 +02:00
Rsl1122
1511162f5b Fixed a bunch of IntelliJ inspections
- Fixed possible null issues with NicknameCache
- Removed bunch of unused code, such as:
  - Point reduction algorithm implementations
  - HighCharts data String parsing methods
  - Unused Mutators
  - Unused AnalysisKeys
  - Leftovers from ConnectionSystem (Response codes)
  - Unused queries (Leftovers from Server box and Players table queries)
  - rendering.html.icon.Icons
- Made bunch of fields final

Note that old deprecated API classes do not have signature changes.
2019-11-02 16:28:43 +02:00
Rsl1122
2970b6590e Retry on Deadlock to Transaction
Recommended behavior for MySQL deadlock is to retry the transaction.

Added code that performs 3 attempts with recursion if deadlocks occur.

Affects issues:
- Fixed #1212
2019-11-02 12:36:59 +02:00
Rsl1122
8749d12128 Rewrote RemoveDuplicateUserInfoTransaction
NOT IN has a long execution time and leads to lock time being large.

Modified the transaction to select the duplicates and then remove them

Affects issues:
- Possibly fixed #1212
2019-11-02 11:35:04 +02:00
Risto Lahtela
1790095b82
Create FUNDING.yml 2019-10-30 16:43:37 +02:00
Rsl1122
f061d40079 Italian Locale (IT) by Malachiel 2019-10-27 12:11:02 +02:00
Rsl1122
a8ed36b051 Made redirection subdirectory friendly
Redirection from the root page / was pointed towards address like
/server leading to reverse-proxies using subdirectories to misbehave

Fixed by changing all known redirections:
- / now uses relative redirects
- /server/wrong_name now redirects to [Configured address]/server
  Configured address takes Alternative IP settings into account.

Affects issues:
- Fixed #1207
2019-10-27 11:55:25 +02:00
Risto Lahtela
d0b2559598
Update versions.txt 2019-10-25 16:43:08 +03:00
Rsl1122
e67f7193ef Fixed network page#tab-servers using month data
This caused some loading issues when network had a lot of servers
2019-10-25 15:37:17 +03:00
Rsl1122
f4ff03bbc9 Limited some extension query ID results to 1
MySQL is very strict about subquery size in insert, so duplicate rows
would cause issues in next inserts (Duplicates can occur if two servers
do the same work at the same time)
2019-10-25 15:30:36 +03:00
Rsl1122
641cd24077 Added missing license header 2019-10-25 15:25:52 +03:00
Rsl1122
83293804a5 Fixed UUID parsing from String for JSON requests
Due to the way Optional#orElse works, the part inside orElse was run
even when the UUID could be parsed from the given String, leading to
unnecessary work as well as errors in the player UUID query
(That uses names and doesn't look at uuids like the server query)

Fixed by splitting the two execution branches

Affects issues:
- Fixed #1200 (Manually tested)
2019-10-25 15:12:01 +03:00
Rsl1122
64f26f1df6 Fixed NPE when player has no 'favorite server'
Favorite server is determined by playtime and if player has no sessions
the player's favorite server will be null, leading to NPE while parsing
JSON.

Added Optional to the source of the null value
2019-10-25 15:08:40 +03:00
Rsl1122
e5a233ae0e Made google relocation rules more specific
Affects issues:
- Fixed #1196 (Manually tested)
2019-10-25 14:39:55 +03:00
Rsl1122
0a2bb0d203 Player time placeholder changes
- Fixed time amount formatting
- Added player_server_ placeholders for all _time placeholders
2019-10-25 13:26:35 +03:00
dependabot-preview[bot]
bf9043ab20 Bump dagger from 2.25 to 2.25.2 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.25 to 2.25.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.25...dagger-2.25.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 05:53:57 +00:00
dependabot-preview[bot]
a771c980b1 Bump dagger-compiler from 2.24 to 2.25.2 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.24 to 2.25.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.24...dagger-2.25.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 05:30:06 +00:00
dependabot-preview[bot]
70b0a80e65 Bump dagger from 2.24 to 2.25 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.24 to 2.25.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.24...dagger-2.25)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-23 15:09:47 +00:00
Risto Lahtela
52b425360d
Update README.md 2019-10-22 10:26:12 +03:00
Risto Lahtela
44b7e25bb5
Update README.md 2019-10-20 15:09:41 +03:00
Risto Lahtela
9909507360
Update versions.txt 2019-10-19 14:40:11 +03:00
Rsl1122
d20427ca5e Fixed some warnings reported by tools 2019-10-19 14:17:58 +03:00
Rsl1122
194bbe9850 Tests against Activity index calculation mismatch 2019-10-19 14:09:29 +03:00
Rsl1122
d17a962505 Prevented unregistered player export
Error was reported on Discord that exporting on join sometimes
caused a BadRequestException

A check was added to prevent exporting non-registered players.
2019-10-19 13:56:04 +03:00
Rsl1122
2c714fe4e9 Improved Webserver Exception handling
- BindException printed a stacktrace on console.
- Bungee threw EnableException with Webserver disabled

- Now writes a easy to read error about bind error
- No longer mandates webserver to start on Bungee (Export possible).

Affects issues:
- Invalidate / Close #1184
2019-10-19 13:38:31 +03:00
Rsl1122
50a0e3ccdd Changed export open options
FlatIcon_circle.png is truncated to 0 bytes on second write.

Added WRITE Open option to the FileOutputStream

Affected issues:
- Possibly fixed #1194
2019-10-19 13:18:15 +03:00
Rsl1122
e41b270f1b Fix recursive replacement in NetworkPageExporter
A replacer could replace same String multiple times and produce
../../../../server/ instead of intended ../server/

Changed method call from replace to replaceOnce
A single instance of server/ exists in the file.

Affected issues:
- Possibly fixed #1195
2019-10-19 13:07:07 +03:00
Rsl1122
d07c83e111 Increased JSON request timeout
Some JSON requests were timing out with slow internet speeds.

Request timeout increased: 20s -> 45s

Affects issues:
- Close #1185
2019-10-19 12:52:21 +03:00
Rsl1122
c46eac3121 Fixed 3 H2 SQL Errors
Three different SQL queries were causing errors on a H2 database.

Found causes:
- [42001-199] Extra parentheses around subquery: '... FROM (subquery)'
- [HY004 not found] H2 performs query type checks at compile time and
  thus parametized  variables inside SELECT need to be implicitly cast
  to a type

Fixes:
- Removed extra parentheses around 2 queries
- Added a cast to CHAR to a query

Affects issues:
- Fixed #1183
2019-10-19 12:46:32 +03:00
Rsl1122
ce8a5d331f Reproduced errors in #1183 2019-10-19 12:46:30 +03:00
Rsl1122
549cad4da5 Use getDouble with SQL function AVG()
MySQL that restricts float being queried with getLong caused an
SQLException

All usages of getLong with AVG function replaced with
getDouble cast to long.

Affects issues:
- Fixed #1181
2019-10-19 12:42:25 +03:00
Rsl1122
68c845e71b Use getDouble with SQL function AVG()
MySQL that restricts float being queried with getInt caused an
SQLException

All usages of getInt with AVG function replaced with
getDouble cast to int.

Affects issues:
- Fixed #1181
2019-10-19 00:06:46 +03:00
Rsl1122
55401c86c1 Removed usage of Server name in JS
Improper sanitation was causing issues when server name contained
a single quote symbol.

.server-name replacement was not in use so the offending line of
JS code could be removed.

Affects issues:
- Fixed #1191
2019-10-19 00:00:33 +03:00
Rsl1122
a5fbe76c39 Updated AdvancedBan Extension to newer version
Reported StringIndexOutOfBoundsException was likely caused by
AdvancedBans giving something else than UUID with getUuid() method.

Fixed by rejecting Strings smaller than 32 characters
(UUID with dashes is 36)

Affects issues:
- Fixed #1192
2019-10-18 23:57:45 +03:00
Rsl1122
18c4b23e1f Updated NucleusExtension to newer version
Reported NoSuchMethodError did not seem to make sense.
Compiled the extension with newest api version to get it fixed.

Affects issues:
- Possibly fixed #1196
2019-10-18 23:48:03 +03:00
dependabot-preview[bot]
cd911c552d Bump mysql-connector-java from 8.0.17 to 8.0.18 in /Plan
Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.17 to 8.0.18.
- [Release notes](https://github.com/mysql/mysql-connector-j/releases)
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 05:52:30 +00:00
dependabot-preview[bot]
9d8241b116 Bump gson from 2.8.5 to 2.8.6 in /Plan
Bumps [gson](https://github.com/google/gson) from 2.8.5 to 2.8.6.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.5...gson-parent-2.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-07 08:43:22 +00:00
Rsl1122
de5635d9bd Fixed dependency scope (GriefDefender) 2019-10-06 11:49:28 +03:00
Rsl1122
de0e71333c Registered GriefDefender Extension 2019-10-06 11:39:51 +03:00
Rsl1122
774fe39415 Updated Essentials Extension
+ Economy support by Vankka
2019-10-06 11:39:50 +03:00
Risto Lahtela
dcf47f1120
Removed comment from Webserver.Disable_Webserver (#1180) 2019-10-06 11:38:32 +03:00
Risto Lahtela
d05ece6106
Fixed exception on Caller.updatePlayer (#1179)
* Caller.updatePlayer(null, null) now fails silently
* Updated DKBans Extension

Fixes update call with null UUID

Affects issues:
- Close #1176
2019-10-06 11:07:21 +03:00
Risto Lahtela
0c38f6f8c6
Create release-drafter.yml 2019-10-06 11:02:23 +03:00
Risto Lahtela
e5136dbed2
Disabled CoreProtect Extension (#1178)
Affects issues:
- Close #1165
2019-10-06 10:43:35 +03:00
Risto Lahtela
f75adde86e
Update README.md 2019-10-05 11:46:18 +03:00