Commit graph

356 commits

Author SHA1 Message Date
Learath bc11fc2a35 Add GameUuid to teamscore aswell
Also get GameUuid through an interface.
2018-02-07 16:43:36 +01:00
Learath 94d98e833a Fix mistakes. Fix CREATE TABLE 2018-02-07 01:10:02 +01:00
Learath 0aeb912db2 Escape the UUID just in case 2018-02-07 00:44:03 +01:00
Learath 4a52bca55d Include the teehistorian uuid instead 2018-02-07 00:35:21 +01:00
Learath 4748d5f065 Add client version to the record 2018-02-06 20:07:42 +01:00
def 3033fbb466 Also pass negative numbers 2018-01-21 19:13:20 +01:00
def a731482152 /top5, /top5team, /top5points, /times also show worst results with negative numbers 2018-01-21 19:08:52 +01:00
Dennis Felsing 31bbbaf512 case sensitivity 2018-01-15 09:10:20 +01:00
Dennis Felsing 272e14357c Fix SQL code for points/top5points 2018-01-15 09:08:51 +01:00
def ac2943a49b utf8mb4 in database for real utf8 2017-08-26 09:00:33 +02:00
def 98520bb407 other kind of fix 2017-08-19 09:36:13 +02:00
def d40dd4f362 Don't try next SQL server when /times returns empty 2017-08-19 09:32:14 +02:00
def 0a28556481 A bit nicer birthday message 2017-07-31 18:24:16 +02:00
def d9aeeae3fc Fix sql_score.cpp formatters 2017-07-30 14:23:25 +02:00
def adef38a574 Revert "We want the Timestamp of a team to stay min(Timestamp) to indicate the first time this team finished the map"
This reverts commit bf0e67a34a.
2017-07-26 18:12:41 +02:00
def cf08239e58 no plenk 2017-07-24 20:58:51 +02:00
def bf0e67a34a We want the Timestamp of a team to stay min(Timestamp) to indicate the first time this team finished the map 2017-07-23 21:20:12 +02:00
def 42b07441a5 Try to make SQL connections a bit more hardy 2017-07-08 14:14:50 +02:00
ChillerDragon 727b9f84b6 fixed scoreboard update for slow racers (less hacky) (#765)
* fixed scoreboard update for slow racers (less hacky)

* Fix some style issues
2017-07-05 23:01:57 +02:00
def 45acda1a66 Fix compiler warning 2017-06-02 21:49:53 +02:00
def c49aa0671f Revert "A bit faster"
This reverts commit 1428c25083.
2017-05-24 23:16:10 +02:00
def 1428c25083 A bit faster 2017-05-24 21:39:04 +02:00
def 02995bf72f Oops 2017-05-24 21:36:14 +02:00
def 1f86e6c8df Save fixes 2017-05-24 21:32:26 +02:00
def 0f14307e8f oops 2017-05-17 22:37:54 +02:00
def 7e7d56048b New try at loading in team only 2017-05-17 22:30:13 +02:00
Dennis Felsing 87adba55ad Allow voting again if no map could be found for random map vote 2017-05-15 11:15:04 +02:00
def 8c9995f166 oops 2017-05-14 22:44:52 +02:00
def 413f96b43d Prevent some save/load cheating 2017-05-14 22:42:49 +02:00
def f4112e3bcb Revert "Tees must be teamed up before loading"
This reverts commit d29f2306ef.
2017-05-14 22:36:44 +02:00
def f2232b8026 Fix compilation 2017-05-14 22:14:02 +02:00
Dennis Felsing 58207926ac Merge pull request #726 from Learath2/dd_pr_load
Tees must be teamed up before loading
2017-05-14 11:54:39 +02:00
def 8dcad29138 Also update timestamp in team rank (fixes discord bot to show team ranks when they exist) 2017-04-23 14:08:58 +02:00
def 9da2655ea7 Add own time to /mapinfo 2017-04-21 20:13:51 +02:00
def 407943a0a0 A bit more cautious SQL code 2017-04-13 09:26:12 +02:00
def d450678bf3 Quit even if score-threads didn't complete 2017-04-13 08:38:27 +02:00
Learath 0cafa8b813 Random tees can't load saves 2017-04-12 16:59:46 +02:00
Learath 47f405e160 Remove tees that don't belong 2017-04-12 10:33:02 +02:00
Learath d29f2306ef Tees must be teamed up before loading 2017-04-11 21:18:26 +02:00
HMH 7ef108c818 Fix style in some places which the previous fix missed 2017-03-23 22:28:06 +01:00
necropotame b8e4e5beea Fix style in several places 2017-03-22 19:45:14 +01:00
def 3ed6692ad7 SQL string cleanup 2016-09-25 10:41:34 +02:00
H-M-H 1a311585be escape strings before applying FuzzyString 2016-09-03 18:28:11 +02:00
def c91ef1ea81 str_append instead of strcat 2016-08-21 21:14:41 +02:00
def 2aa3303884 Longer team ranks 2016-08-21 21:06:12 +02:00
H-M-H 35bd378a62 fixed RandomUnfinishedMap
do not execute this function several times even after success
2016-06-22 02:00:29 +02:00
def e518a701a3 Clean up sql dbg_msg calls 2016-06-15 11:52:40 +02:00
def e0ec97174a Try to fix broken /map 2016-06-10 03:05:47 +02:00
HMH bb9d23bb73 sql-save: forgot a line 2016-05-31 12:32:09 +02:00
HMH 28d116217b fixed resetting of saving-state of teams (was not reset always)
destructor of CSqlTeamSave takes care of that now
while doing so the allocation of CSaveTeam has been moved to the stack
2016-05-31 00:03:28 +02:00
HMH ea5892b1ce don't clear sql-mapstring twice 2016-05-21 22:53:49 +02:00
H-M-H b648b530d5 Merge branch 'master' into sqlmasters 2016-05-20 23:40:29 +02:00
def 3c54f443b2 Make sv_join_vote_delay work for /map votes and make the number of seconds configurable 2016-05-20 20:05:47 +02:00
def ede6a9f93f More uniform /times output (thanks Soreu) 2016-05-20 18:28:33 +02:00
H-M-H 2bcbe52d14 fixed /load message 2016-05-11 15:54:09 +02:00
H-M-H 42fc8a0fe2 fixed use of Str and ClrStr 2016-05-11 15:26:16 +02:00
H-M-H 6a2438e1cf fixed includes 2016-05-11 15:01:53 +02:00
H-M-H 3b6baaa8d3 made CSqlData const for threadfunctions and added a class for sqlstrings
CSqlData is const for threadfunctions now to avoid modification from
within the threadfunctions as these might be called several times.
Previously this was a problem as ClearString could possibily be applied
multiple times to the same string.

To solve this the class CSqlString has been added. This class takes a
const char* and copies it. Additionally a clearstring is created from
the given const char*. This enables access to the original as well as
the cleared string safe for sql-statements.

sql_string_helpers got an own source file now.

A crashbug from CSqlServer has been fixed (pointer has not been set
back to 0)
2016-05-09 23:35:23 +02:00
H-M-H 4bf1a68292 do not write nullbytes to failed_sql.sql 2016-05-05 13:23:35 +02:00
H-M-H 30ca8d8774 made writing to sql-failurefile threadsafe 2016-05-04 23:37:34 +02:00
H-M-H 5dc47ede58 put sql_string_helpers into an own namespace 2016-05-04 16:51:18 +02:00
H-M-H a7c0cd58ee fixed birthdaycheck and the format of sql-inserts for the failure-file 2016-05-04 16:47:53 +02:00
H-M-H cd41220a44 wait for score-threads on shutdown 2016-05-04 15:32:24 +02:00
H-M-H a93e845e6d checkbirthday now also sends a broadcast to the 'birthdaychild' 2016-05-03 23:50:42 +02:00
H-M-H 94f163f094 added CSqlPlayerData for simple tasks like getting best time 2016-05-03 23:24:44 +02:00
H-M-H c9e65c7931 Merge branch 'master' into sqlmasters 2016-05-03 23:07:24 +02:00
H-M-H c9b64053d0 cleaned up structure of sql_score.cpp 2016-05-03 20:45:58 +02:00
H-M-H d0cebb576d sql-score can now handle mapchanges/reloads 2016-05-03 20:36:17 +02:00
def 61e47422f6 Clean up debug messages a bit (lower case, no useless errors) 2016-05-02 21:35:32 +02:00
def 750f30b6b9 Don't use hardcoded table name 2016-04-23 16:42:54 +02:00
def fc2bf86174 Birthday check when player joins 2016-03-26 00:20:18 +01:00
def 52fcc6e550 Fix sv_hide_score 2016-03-26 00:19:44 +01:00
def b2105ef3ec Revert "Nicer formatting for SQL stats"
This reverts commit c36b7efe1d.
2016-03-09 23:45:48 +01:00
def 64e4f99102 Revert "Further improvement on ranks formatting"
This reverts commit fad318e86f.
2016-03-09 23:45:43 +01:00
def fad318e86f Further improvement on ranks formatting 2016-03-08 17:53:49 +01:00
def c36b7efe1d Nicer formatting for SQL stats 2016-03-08 17:36:14 +01:00
H-M-H 53a004fa74 reset preferred sql-server to the first specified
on map load
2016-02-20 15:33:35 +01:00
H-M-H 2bd6d0c381 do not always try to connect to unreachable sqlservers
but instead remember the last reachable server
- some cleanup
- added timeout of 10 seconds to sql-connections
2016-02-20 15:33:35 +01:00
H-M-H 783c2161f1 sql_score init is threaded now 2016-02-20 15:33:35 +01:00
H-M-H 8dacd88755 more generic format of saved sql-inserts 2016-02-20 15:33:35 +01:00
H-M-H 88ed7391da handle exceptions from sql properly
- write failed sqlinserts to a file
- improved structure
2016-02-20 15:33:35 +01:00
H-M-H 1314085928 restructured sqlconnection
reading from and writing to several different servers is now possible
TODO:
-handle Exceptions properly (try another sqlserver)
-if everything fails while writing write the insert to a file
2016-02-20 15:33:35 +01:00
H-M-H 2d41ce3527 try next sqlmaster also if the current write fails 2016-02-20 15:33:35 +01:00
H-M-H c4ab59e4c3 fixed use of locks for threading:
each sqlserver has its own lock now
-> it is required that every connect call is followed by a disconnect call
2016-02-20 15:33:35 +01:00
H-M-H 15f2e07c48 moved sqlserver stuff into CServer-class
as sqlconnections should not last only
until next mapreload
2016-02-20 15:33:35 +01:00
H-M-H 6ba10d2719 mastersqlservers are working now
TODO: move the sqlserver objects somewhere else
so they wont be destroyed on every reload
2016-02-20 15:33:35 +01:00
H-M-H 5e4456584f started with sqlmasters
+ added #ifdef for sql_server.cpp
(fixes compilation for release mode)
2016-02-20 15:33:35 +01:00
H-M-H 9ed66f7adc Cleanup of Sqlconnection
-moved all connectionstuff to a new class
-moved sqlstring functions to an own file
-do not give threads access to CSqlScore
2016-02-20 15:33:35 +01:00
def 05fcc58b2f Oops, next SQL server compilation fix 2015-09-23 14:05:54 +02:00
def 97152e5cbf Hopefully fix SQL server compilation with Visual Studio 2015-09-23 11:54:20 +02:00
def 336e916548 Add option not to create sql tables 2015-09-15 09:28:18 +02:00
def ffe9235151 Oops, another one 2015-09-05 17:59:37 +02:00
def 7487923774 Fix Windows thread handle leak 2015-09-05 04:49:22 +02:00
def 0fa06c4a5e Server names may be 4 bytes long 2015-09-05 00:48:11 +02:00
def f62bb1821c /map and /mapinfo improvement (fixes #292) 2015-08-19 22:43:08 +02:00
def 1fd0f947af Better numbers in average time for /mapinfo 2015-08-09 22:20:52 +02:00
def f39b85a3e2 Add average time to /mapinfo 2015-08-06 16:02:00 +02:00
def d57b0d62c6 Support for 0 stars in database 2015-07-23 12:49:22 +02:00
def 949fcb2c40 Remove one useless debug print 2015-07-23 12:11:42 +02:00
def bab961f054 Prepare switch to mixed case server names 2015-07-22 19:56:24 +02:00
def 0cb50c1805 Print actual SQL inserts/updates to debug log 2015-07-22 19:05:45 +02:00
def 4e658c1057 Minor cleanups 2015-07-22 18:23:40 +02:00
def da68023f7a Off by one ;) 2015-07-11 19:28:45 +02:00
def 6d68e22cd1 Hopefully fix string fuzzying for unicode 2015-07-11 19:26:57 +02:00
def 73229fbb62 Only allow /save when team is started already (prevents saving after
noobfilter)
2015-07-09 23:48:29 +02:00
def 6e8ada1ac8 Fix whitespaces a bit 2015-07-09 02:12:35 +02:00
def fbe1bcbf39 Don't capitalize server name in /mapinfo 2015-07-08 15:47:46 +02:00
def 872a94618d Oops, use non-fuzzy map string 2015-07-08 02:14:33 +02:00
def 87227927cd /map and /mapinfo: Prefer exact match, including capitalization 2015-07-08 02:07:49 +02:00
def e20be248f0 Fix previous commit 2015-07-01 16:27:19 +02:00
def e552ef2643 Print number of finished tees in /mapinfo as well 2015-07-01 16:24:27 +02:00
def 3b7fca86c6 Initialize pReleasedString 2015-06-25 22:38:16 +02:00
def dcddb7896d It would help to test before commiting 2015-06-24 21:53:00 +02:00
def 2decad5d75 Fix SQL query of /mapinfo for empty case 2015-06-24 21:46:42 +02:00
def a0ac817966 Fix 2015-06-24 19:18:59 +02:00
def 6b300334f7 Nicer wording 2015-06-24 19:17:49 +02:00
def 7c9d452c61 Fix /mapinfo string 2015-06-24 19:15:03 +02:00
def 9a55f52e61 Fix SQL query 2015-06-24 19:04:34 +02:00
def 6b1c7a5350 Initial support for release dates in /mapinfo 2015-06-24 19:03:03 +02:00
def 230ad1a6f6 Revert "Timestamp index for race table for improved performance of /players/"
Better indices on the relevant server, not necessary everywhere else.

This reverts commit d4d5109c47.
2015-04-19 12:52:27 +02:00
def d4d5109c47 Timestamp index for race table for improved performance of /players/ 2015-04-19 11:55:35 +02:00
def 3992b1346b Hopefully fix compilation on new OS X systems
Names collided with some new OS X defined names, fixes #189
2015-04-07 19:07:38 +02:00
def 96e864e9c3 Fix: Make /map work with # 2015-01-23 21:47:16 +01:00
def 6dc501f286 Fix: Actually should spam protect sql messages 2014-12-25 14:56:31 +01:00
def ec53836d83 Don't lose memory 2014-12-19 17:51:04 +01:00
def 8f72b2fdb6 Fix 2014-12-19 17:47:11 +01:00
def 87afb28a40 Further save cleanup 2014-12-19 17:43:23 +01:00
def da0750d26f Remove buggy and unneeded finish time in /rank and /rankteam 2014-12-19 16:27:10 +01:00
def 75bbf64bbd Allow to set country where you can load savegame 2014-12-19 11:30:14 +01:00
def b0ae9d095f Don't spam protect sql messages 2014-12-18 15:52:24 +01:00
def 2750a23792 Only allow savegames on same server. Clean up saving a bit and prevent another possible exploit 2014-12-17 20:38:05 +01:00
def 0a9b0b11b9 Significantly improve performance of /rank 2014-11-11 11:51:36 +01:00
def ae78518c83 Another fix for mariadb 10 2014-11-11 11:35:43 +01:00
def 37a8e89f73 Fix /points and /top5points with MariaDB 10 2014-11-09 20:22:31 +01:00
def 630e8430aa Fix: Show 0 finishes in /mapinfo 2014-11-09 00:25:53 +01:00
def 0f257bf553 Add delay (of 1 minute by default) to loading savegames 2014-10-26 02:39:12 +02:00
def e29571dd73 save doesn't create ranks accidentally anymore (fixes #73) 2014-10-21 14:27:10 +02:00
def e0a16e0644 /mapinfo: Show mapper name 2014-10-11 12:58:27 +02:00
def 9c0bb7d02b Vote random map with defined nr of stars 2014-10-11 01:01:32 +02:00
def dcc64f1902 Vote random unfinished map with defined nr of stars 2014-10-11 00:41:56 +02:00
def 3dd24c3dee Add stars to /mapinfo 2014-10-11 00:16:33 +02:00
def ce0f1d2ed7 Fix segfaults when mysql server is not reachable and map is changed/reloaded 2014-09-26 23:59:11 +02:00
def f175025c8c Add number of finishes to /mapinfo 2014-09-20 14:07:46 +02:00
def 5825077537 Use new record_points 2014-08-26 17:46:47 +02:00
def d46eb4b03c Preparation for faster /points and /top5points 2014-08-26 14:18:38 +02:00
def dff02ab916 Record server name into sql table record_race 2014-08-26 03:46:24 +02:00
def 75538e32cc make sv_vote_max_total only work for kick and spec votes 2014-08-12 13:41:57 +02:00
def 5cbd71de8f Try to fix /save for solo servers 2014-07-28 15:42:57 +02:00
def a28cc2da76 Fix save/load freeze 2014-07-26 17:16:42 +02:00
def 145f0434f5 Add /save by the glorious HMH 2014-07-26 14:46:31 +02:00