Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories โ€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2018-08-05 00:00:00Z and 2018-08-06 00:00:00Z
Avatar
Setted up DB doesnt show "/points" command but shows time and other stuff
10:48
10:48
any thoughts ?
Avatar
do you have a points table in the db?
Avatar
@Learath2 how to generate record_points
12:35
i couldnt work it out
Avatar
I was working on it with ZombieToad yesturday. I added the following external sqls - record_race, record_teamrace,record_maps. But when I use "/points" it doesnt work, even when the map is finished. Also we are trying to figure out how the points generate
12:37
@Learath2 can you assist us ?
Avatar
CREATE TABLE record_points ( Name varchar(16) COLLATE utf8mb4_bin NOT NULL, Points int(11) DEFAULT '0', UNIQUE KEY Name (Name) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Avatar
@Learath2 i meant how to fill it?
Avatar
oh we have a script that does it iirc
Avatar
ddnet only provides record_maps and record_race
Avatar
actually no, it should automatically fill nowadays
12:40
do you get any errors?
Avatar
the server fills it?
Avatar
doesn't the server auto create records_points?
12:41
the server on first launch creates all tables
12:41
do you have the maps added to record_maps?
12:42
it creates the table
12:42
but i cant find where it fills it
Avatar
sql_score.cpp#L548
12:50
@Profile why are you digging around on mysql stuff anyways? It's just too messy
Avatar
I wanna set up server with ability to check points there.
12:52
and run it 24/7 for guys when servers are under DDOS. (i know that points would be unofficial, but more accurate to reality)
Avatar
well let me know if you get stuck anywhere else
Avatar
ZombieToad was trying to help me yestruday
12:53
but we stuck with points
Avatar
well you didn't answer my questions ๐Ÿ˜› did you let the server create the tables or did you create them by hand? Is records_maps filled or not?
12:55
when I check "top5" etc I see the results
12:55
but /points shows me "hasnt collected any points so far"
12:55
so I guess the server created the tables but they are empty when I use points idk (edited)
Avatar
can you show me the output of SHOW TABLES;?
13:00
13:07
@Learath2
Avatar
SELECT NULL FROM record_points; (edited)
Avatar
Epty set 0 sec
Avatar
same but FROM record_race;
Avatar
which command to select record race to get info from it?
13:16
13:16
If i did it correct
13:16
@Learath2
Avatar
supposed to be SELECT NULL FROM record_race; but w/e this works aswell
13:17
can you check the contents of the file record_points.sql you imported from?
13:19
so i didnt import it
13:19
cuz I hadnt it
13:19
it has been generated by itself
13:19
I mean record_points.sql
13:22
i didnt
13:22
@Learath2 the result of -SELECT NULL FROM record_race;
Avatar
we don't include a record_points.sql?
Avatar
th link I got from website had these sql files
13:23
maybe I had a wrong link
Avatar
no no
13:25
guess we just don't include it
Avatar
hmm DDspeed got it from somewhere
13:25
but I diddnt find a link of it
Avatar
ddnet-scripts - The magic scripts that make DDNet run
Avatar
it forwards to a website isnt ?
13:27
zombietoad was trying to do that step yesturday and we stuck there
13:34
@Learath2 what should I do ?
Avatar
ranks.py is the thing that generates the msgpack
13:38
but that's just too long
13:38
gimme a second I'll write a query for you that recalculates the points
Avatar
oh thanks
Avatar
hmm, my mysql-fu is failing me
Avatar
hmm oO?
Avatar
INSERT IGNORE INTO (Name, Points) (SELECT Name, Points FROM record_race t1 INNER JOIN record_maps t2 ON t1.Map = t2.Map; GROUP BY Name, t1.Map) ON DUPLICATE KEY UPDATE Name=VALUES(Name), Points=Points+VALUES(Points);
14:15
Try this maybe, will take some time to complete
Avatar
in teeworlds mysql terminal command ?
Avatar
it's a mysql query obviously ๐Ÿ˜ƒ
Avatar
select teeworlds DB before ?
Avatar
thanks Ill try
Avatar
takes around 3.5 mins for the SELECT to complete, the insert should take a min or so, so 4 mins maybe
14:19
did I smth wrong ?
Avatar
Why are you building a fake ddnet server anyway?
14:21
Just because we didn't have time to code a filter to mark non official servers? ๐Ÿ˜ฆ
Avatar
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY Name, t1.Map) ON DUPLICATE KEY UPDATE Name=VALUES(Name), Points=Poi' at line 1
14:22
send help
Avatar
I dont want to abuse any your lack of code, I want to help the community while the DDnet is under attack, also Ill mark the server as "Unofficial server'
14:23
you are asking me like I wanna do smth bad ๐Ÿ˜ฆ
Avatar
ddnet provides a guide to import the databases but it doesnt fully work?
Avatar
Well someone is telling me you intend to run these as "DDNet" servers and @ZombieToad is helping you, he is known to set up honey pots before
Avatar
yes i did have record_points before but icant rememebr how i did it
Avatar
I guess thats trolls etc
14:24
I never told that
Avatar
i deleted it yesterday to try help miso xD
Avatar
We don't export points as it can be generated from record_race, the scripts are there, I tried to write a query that generates it but my sql is pretty weak
Avatar
btw whats "honey ports" ?
Avatar
i tried the code from mysql-sync-servers
14:26
INSERT INTO record_points (Name, Points) SELECT Name, sum(pt) FROM (SELECT (m.Points) AS pt, r.Name FROM record_race r LEFT JOIN record_maps m ON r.Map = m.Map GROUP BY r.Map, r.Name) a GROUP BY a.Name HAVING sum(pt) > 0;
14:26
ERROR 1062 (23000): Duplicate entry 'BATMAN' for key 'Name'
14:28
@Learath2 pls help
14:28
you trained all moderators to avoid honeypot servers so its fine
Avatar
I'm not helping you make a honeypot until I write a filter for non-DDNet servers
Avatar
but im not making a honeypot
14:29
im trying to help miso
Avatar
Im a bit upset, I have took my second PC installed there ubuntu and spending a lot of time to set up it with an intention to help community due to a lot of DDOs atacks, but instead of understanding me I hear to my adress that I wanna abuse smth and some charges...
Avatar
I recognise that tone, is that you Absoliwt?
Avatar
what ?
Avatar
I only know one other person that goes from thankfulness to defensiveness this quickly
Avatar
absoliwt got points working on his server tho
Avatar
Anyways, no worries. I'll finish up your query and I'll code a filter tonight, so happy fishing for the 2-3 hours you have ๐Ÿ™‚
Avatar
what should I tell...
Avatar
@Profile under what name do you play on ddnet
Avatar
wait, thats in cyrylic I dont have cyrylic on ubuntu
Avatar
your interface is in russian
Avatar
in english
14:37
but ubuntu yes due to location
14:37
discord*
Avatar
then use some web keyboard?
14:40
Russian Keyboard online - type Russian letters on English (or any other) computer when no system Russian keyboard tools are available. Input Russian Cyrillic letters using this virtual Russian Keyboard Emulator is like typing at home, one can input Cyrillic, Russian alphabet...
14:41
@Profile u gone?
14:42
I was running my second pc with cyrilic
14:42
"ะŸัƒัั‚ะพะน"
14:42
is my nickname
Avatar
you haven't finished anything since 1 year?
14:43
just talking
Avatar
INSERT IGNORE INTO record_points SELECT Name, Sum(pt) FROM (SELECT ( m.points ) AS pt, r.NAME FROM record_race r LEFT JOIN record_maps m ON r.map = m.map GROUP BY r.Map, r.Name) a GROUP BY a.Name HAVING Sum(pt) > 0 should work
14:43
enjoy
Avatar
actually I was changing nickname for fun to other
Avatar
I'm going out for food
Avatar
learth2 thanks
Avatar
what was your other names?
Avatar
jap whas the interrogation ?
14:45
jao*
14:45
should I proove smth Idk why are you asking me
Avatar
that query gives a different result to recalculate_points.py, Idk why though
Avatar
ye you are actually ultra suspicious xd
14:46
why ?
Avatar
and if you want to get help, shouldn't be hard to answer some questions right
14:46
because you want to clone ddnet and you aren't known
Avatar
If I knew it would be a problem I could be more active before xD
14:48
14:48
is it correct ? (edited)
Avatar
missing the semicolon
Avatar
semicolon ?
14:50
; - after that ?
Avatar
thanks thats working. I hope Ill help community if DDOS will come again
Avatar
@deen recalculate points seems to be broken somehow
15:08
1 is a row in the current table, 0 is a row in the db that query generates
15:09
or that query is broken somehow, but that is the diff of the two tables
Avatar
e86000b Teleport Gun Event over - def-
Avatar
5adb9bb fix teleportgun2 times - def-
21:19
6cb21f6 Fix both teleportgun times - def-
Exported 160 message(s)