IRC logs for #openttd on OFTC at 2023-09-15
β΄ go to previous day
00:00:31 <jfs> truebrain: Actually, I have some preconception that clang (or its linter) should be relatively easy to extend to have that, but it might be a kinda big dependency to add a patched clang to the CI pipeline (unless it takes dynamic plug-ins)
00:03:24 <jfs> Alternative or additional coding convention that OpenTTD might adopt too, require that all access of global data is prefixed with namespace, also global namespace accesses
00:08:19 <jfs> Yeah looks like clang-tidy does not have an existing check for member access only via this->
00:08:53 *** patrick[m]12 has joined #openttd
00:11:10 *** fiddeldibu[m] has joined #openttd
00:21:56 <jfs> Ah nice, clang-tidy does have support for out of tree plugins
00:22:57 *** Wormnest has joined #openttd
00:31:28 <jfs> There's also clang-query that might make it possible to "just script", but it's probably not a good long term solution
00:53:20 *** _aD has quit IRC (Quit: leaving)
00:59:56 <robamd64> _glx_: gave up on OpenTTD but I did do this
01:17:36 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:35:08 *** Wormnest has joined #openttd
02:26:34 *** tehboss has joined #openttd
02:26:34 <tehboss> is there a network protocol specification for the openttd mulitplayer networking anywhere?
02:43:33 *** Wormnest has quit IRC (Quit: Leaving)
02:50:41 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:02:26 <tehboss> also why does it use little endian?
03:15:06 <FLHerne> It has to explicitly care about endianness one way or the other, so multiplayer works cross-platform with PowerPC and whatever else
03:16:02 *** D-HUND is now known as debdog
03:16:21 <FLHerne> At that point the choice is arbitrary and LE is probably easier to read if you're just looking at a string of bytes in a debugger
03:19:33 <FLHerne> I wish we had LE as the norm, but sadly hardware that was BE won out for reasons (afaik) unrelated to that
03:47:13 <tehboss> <@1008475194488258562>
03:50:07 <tehboss> oh whats the irc channel?
03:50:07 <alfagamma7> Read the channel description
03:50:22 <alfagamma7> Discord channel #openttd: on freenode afaik
05:28:23 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:15:50 *** JamesRoss[m] has joined #openttd
06:16:05 *** felix has quit IRC (Ping timeout: 480 seconds)
06:25:39 *** nolep[m] has joined #openttd
06:34:05 <LordAro> alfagamma7: freenode died a death
06:34:21 <LordAro> but this channel was never there anyway
06:49:02 <peter1139> People seem to like buying things and then completely shitting on them.
07:05:19 *** SergioMassa[m] has joined #openttd
07:28:03 *** kstar892[m] has joined #openttd
07:29:42 *** enick_57 has joined #openttd
08:04:19 <truebrain> I guess it is a good thing frosch found that I can crash the nightly, to get an actual crash log from it π Makes testing easier π
08:08:39 <truebrain> except that it doesn't crash on a new game for me .. tons of warnings, but no crash π
08:09:52 <_pruple> hmmm... so the fix is remove German? π
08:10:50 <_pruple> but apparently it's remove "this->"
08:11:08 <truebrain> that fixes a lot of problems π
08:11:24 <truebrain> grr, I want to crash the nightly ... this is annoying .. I need a crashdump π
08:11:37 <peter1139> Load the crash save?
08:11:49 <truebrain> bit tricky to get the savegame loaded on this system .. but I can try
08:12:01 <truebrain> I can recreate the situation as described by frosch
08:12:04 <truebrain> but it doesn't crash π
08:17:33 <truebrain> nope, that save too, doesn't crash for me π¦
08:18:39 <truebrain> owh, after a very long time it did
08:18:47 <truebrain> but .. it doesn't trigger a crashlog
08:18:59 *** tokai|noir has quit IRC (Quit: c('~' )o)
08:19:17 <truebrain> just a generic: string is out of range error
08:19:20 <truebrain> and a normal shutdown
08:24:07 <truebrain> back to loading broken savegames .. sad .. was hoping for a more useful crash π
08:43:44 *** NGC3982_ has joined #openttd
08:45:30 *** NGC3982 has quit IRC (Ping timeout: 480 seconds)
09:03:54 <peter1139> return NotContent() has a different meaning than NoContent()
09:04:13 <truebrain> did you Consent to that?
09:19:02 <alfagamma7> LordAro: Yep remembered that
09:29:07 <pickpacket> truebrain: The question is if he is Content with it?
09:29:36 <tehboss> what i'm developing is an external application in c++ that pretends to be an openttd game client in order to fetch information about the companies on a server, would that go in Discord channel #openttd-development or Discord channel #add-on-development
09:29:36 <tehboss> i'm reading the game code in order to figure this stuff out, not add on documentation so that why i'm thinking i should ask any questions here
09:30:12 <truebrain> the admin port is meant to fetch such information from a server btw
09:30:24 <tehboss> can the admin port fetch profit graphs?
09:30:38 <truebrain> did you check, or are you asking me? π
09:30:59 <tehboss> i'm asking, i have not really checked it out
09:31:28 <tehboss> also i'm not sure if the server owner wants me messing around with the admin port
09:31:36 <truebrain> maybe first look into what the admin-port can do, before you reinvent your own π Just a suggestion btw, I can understand that creating your own game client can be interesting too, so that is fine. Just didn't want you to waste time on something that is already provided π
09:32:15 <tehboss> cos i can't do much harm with normal client level priviledges, but if i was to use an admin port i might be able to do more bad things
09:32:41 <tehboss> is the admin port intended for server admins or just for monitoring?
09:33:22 <tehboss> what are rcon commands?
09:33:32 <tehboss> do they have the ability to do things such as play/pause, or ban users?
09:34:54 *** emperorjake has joined #openttd
09:34:54 <emperorjake> rcon is short for "remote control" because it gives you the ability to send commands that only the server can give
09:35:25 <emperorjake> and yes, you can use it to do those things
09:38:26 <tehboss> because its less likely that my program would be used if it required admin priveledges
09:42:29 <peter1139> As a regular client, in order know the state about companies on the server, you need to process and understand the complete savegame. And if you want it to stay connected you need to handle all the gameplay and network comments from the server.
09:42:59 <peter1139> That includes understand what changes any NewGRF (mods) have made.
09:43:35 <tehboss> i was thinking i'd probably do something like connect -> request company data -> either quit or wait until i get more company data next quarter or something
09:43:37 <peter1139> At this point, you'll realise you need to be building on top of OpenTTD itself.
09:43:57 <peter1139> No, there's no such protocol in the regular game client.
09:44:09 <tehboss> does the game server nto send profit data?
09:44:39 <peter1139> OpenTTD is a lock-step client-server model, all clients run the same game loop as the server.
09:45:26 <tehboss> PACKET_SERVER_COMPANY_UPDATE
09:46:13 <tehboss> or is the company info stored in the map?
09:46:33 <tehboss> i could just connect -> grab company info -> quit
09:46:56 <peter1139> Company info is stored in the savegame.
09:47:22 <tehboss> is that sent with the map?
09:47:28 <peter1139> When a client connects to a server, part of the handshake is receiving the savegame from the server.
09:48:14 <tehboss> i've managed to get a program running and interpreting the game info packet, so i should be able to get one running that will interpret whatver savegame packet i get
09:48:17 <peter1139> Those "MAP" network packets are misnamed, it's a complete savegame, not just map data :)
09:48:57 <tehboss> i guess i can just copy over the map handling bit then
09:49:25 <peter1139> "bit" is an understatement, but yes, you could. Good luck.
09:49:35 <tehboss> i'm also writing my program in c++ with a similar (but slightly different) structure and class names to the openttd client
09:49:36 <truebrain> and pretty sure server owners and clients alike won't appreciate a constant "waiting for player to join" notification, while you download the savegame π
09:50:58 <truebrain> but, if you just want to have fun, go for it! Otherwise .. there is a reason we made the admin port π
09:51:08 <tehboss> can the admin port connect and run some basic things without the admin password?
09:52:07 <truebrain> in general, server-owners don't appreciate it when 3rdparty leech information from their server
09:52:18 <truebrain> they really like to give concent to these kind of things
09:52:46 <truebrain> so they would like to trust your tool no matter what
09:52:54 <truebrain> so with or without the password, does it actually matter? π
09:52:54 <tehboss> yeah server owner is happy with me connecting and grabbing info, not nessecarily hapy with me doing rcon commands
09:53:45 <truebrain> either way, any good server-owner will only have the admin port available on localhost
10:16:07 <alfagamma7> read the setuptools documentation
10:16:42 <alfagamma7> `install` has been deprecated
10:17:08 <alfagamma7> and some stuff that I didn't really understand
10:20:22 <locosage> tehboss: Simplest way to get info is to just patch OpenTTD to dump whatever you need. Though it's not ideal to run it constantly as it inflates server client statistics.
10:20:22 <locosage> I did write a network protocol client in python at some point but that was for one-time scan, to get all the game settings and saves.
10:20:22 <locosage> Normally, profit charts is something a server owner should do via admin port.
10:23:48 <kamnet> Crazy thought, rather than logging into an active game, could the admin just set autosave to quarterly (or whatever), and then you can pull that data from the autosave?
10:25:52 <tehboss> that must have been done right?
10:26:15 <tehboss> cos otherwise how can you get profit graphs in game?
10:26:46 *** ChanServ sets mode: +v tokai
10:27:07 <kamnet> Because if you can do that, then you don't have to worry about rcon or server security, just set up a script to copy file over to sftp or something
10:48:47 <peter1139> But you would need to be able to parse a complete savegame.
10:54:18 <_glx_> Savegame parsing is easy now as the headers are included
10:55:57 <_glx_> TrueBrain wrote a tool for that
10:56:17 <FLHerne> tehboss: autosave saves the game to a .sav file each time, just like manual saving
10:57:16 <FLHerne> the suggestion is that you could download the most recent autosave from the server without going through OTTD, and then extract the data you want
10:58:36 <FLHerne> 'read-only' rcon option might be neat, but also a security nuisance
10:59:22 <FLHerne> In principle it doesn't seem that complex; whitelist commands without side-effects
10:59:51 <FLHerne> I bet there are commands that have side-effects based on the arguments though :p
11:06:47 <truebrain> all solutions are server-local solution; so at that point, why not use the admin port?
11:06:56 <truebrain> it is like .. we can make this very complicated, or .. just use the tools available π
11:10:49 <FLHerne> I think the intention is that it not be server-local
11:11:22 <truebrain> so what good does things like modifying the server, or using savegames, or autosaves, do? π
11:11:41 <truebrain> isn't it just easier to show the server-admin your script doesn't do any harm? π
11:11:49 <truebrain> (and run it locally, ofc)
11:12:32 <FLHerne> granting admin-port access gives control over the server, whereas the client-interface doesn't
11:12:47 <truebrain> all solutions require a form of trust
11:13:09 <FLHerne> making autosaves downloadable is a one-and-done nnginx config, that doesn't require trust
11:13:43 <FLHerne> hosting a script locally requires review to make sure it's safe, then ongoing attention from the server owner for any updates
11:13:47 <truebrain> *shrug* .. feels like we are overcomplicating a relative simple situation. But that is just me π
11:14:08 <FLHerne> and I didn't suggest modifying the server so won't defend that one :p
11:22:17 <peter1139> Hmm, do I need 8gbps at home? I'd have to seriously upgrade my networking equipment to handle that...
11:33:39 <locosage> truebrain: I meant modifying the client, that's kind of the only one reasonable non-server solution.
11:44:36 <truebrain> okay, funny, I can in a browser now read crash.json.log and crash.dmp, and analyze both. The only thing missing, which doesn't work sort-of out-of-the-box, is downloading the correct symbol files
11:44:41 <truebrain> but otherwise, this "just works"
11:45:42 <truebrain> the http downloader for symbols doesn't work, for some annoying little reason .. can I work around that .. dunno .. will it work when I do? No clue π
11:45:59 <peter1139> Hmm, even an RB5009 isn't much help with 8gbps :S
11:46:12 <truebrain> do you ever download anything over 1gbps?
11:46:33 <peter1139> Nope, I'm sub < 100Mbps currently.
11:46:44 <peter1139> (Which back in the day would've been astoundingly fast.)
11:46:51 <truebrain> so it is either < 100 mbps, or 8gbps? π
11:47:00 <peter1139> No I'm just being silly :D
11:47:14 <truebrain> I do like my 1gbps I have here .. but they offered me faster speeds .. like ..
11:47:18 <truebrain> I download a 2 hour movie in 10 minutes
11:47:21 <peter1139> Anyway, my ISP can't provide fibre here yet, and I'm not going to switch to some shitty ISP.
11:47:24 <truebrain> why ....... do I need to be faster? π
11:47:57 <truebrain> (I also needed to seriously upgrade my server to be able to download a movie in 10 minutes .. I/O was a bit of an issue π )
12:29:21 <truebrain> ah, CORS ... I love CORS ... CORS is always so nice to receive ...
12:47:20 <peter1139> Coors? Bit early for booze...
12:47:48 <truebrain> `await occurs here on type "JsFuture", which is not "Send"` .. grr @ Rust being right but also very annoying
13:56:05 <andythenorth> peter1139: I had Asahi
14:00:28 <LordAro> truebrain: help proxmox and ceph is fun
14:17:35 <peter1139> The Linux for Macs?
14:19:57 <peter1139> Hmm, switch expressions can be a bit weird, and I think that means I should not be using it this way :D
14:30:15 <truebrain> LordAro: Owh boy ....... π
14:39:29 <andythenorth> peter1139: the beer π
14:40:25 <peter1139> The future of storage.
14:41:00 <peter1139> I was going to look in to proxmox but ended up just using lxc on Debian. Very manual.
14:55:07 <LordAro> truebrain: so have i got this right - nomad server is the one with all the configuration on it, and tells all the client machines which containers to run and do the actual work. so the server is the one i connect to (how? consul?) and upload the config
15:13:34 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:19:42 <orudge> truebrain: we want to cancel the OVH VPSes when they expire now, don't we?
16:12:29 *** HerzogDeXtEr has joined #openttd
16:20:06 *** blindvt has quit IRC (Remote host closed the connection)
16:58:27 *** kuhnovic has quit IRC (Quit: User went offline on Discord a while ago)
17:48:23 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
18:14:26 <peter1139> Hmm, what happened to StrongIntegralTypedef? :D
18:27:29 <peter1139> Hmm, seems StrongTypedef now requires to be more explicit. Kinda the point, but...
18:38:04 <DorpsGek> - Update: Translations from eints (by translators)
19:25:41 <truebrain> LordAro: Yes. And a node can run both a server and client. And via the nomad cli .. I don't use consul
19:53:45 <peter1139> Maybe I should not use a StrongType after all.
20:01:39 <LordAro> truebrain: node being able to be server and client is interesting
20:01:59 <LordAro> but monday problem now :)
20:30:28 <truebrain> peter1139: You can still weaken it quiet a bit, but no longer to the point it is just an integer, no π
20:31:06 <truebrain> It can however have various of properties, which we can extend. So depends on your demand of the strongtype really π
20:35:44 *** HerzogDeXtEr has joined #openttd
20:50:46 <truebrain> orudge: did you just login to Steam?
20:51:42 <truebrain> just got a notification someone logged in via the main account, but .. I have that 2FA .. and I did not authorize that π
20:56:16 <truebrain> hmm .. at least, notes says it should be linked to my 2FA, but I can't find any evidence of that .. lol .. is it really my 2FA?
21:01:51 <truebrain> odd, so I run the recovery on the account, which sends me a textmessage (which is expected) .. then it says: nah, you can't use this to recover the account .. so why did I have to enter it in the first place?!
21:01:55 <truebrain> sometimes these things confuse the fuck out of me π
21:02:54 <truebrain> `Self-recovery is not available for this account because additional security verification is required. Please contact Steam Support for assistance.`
21:02:55 <andythenorth> somehow it's not all sorted yet
21:03:47 <truebrain> well, I just hope it was orudge .. but the location is not what I expect for a login he does π
21:06:24 <andythenorth> "can we have nice things"
21:09:14 <truebrain> ah, yes, this has 2FA used by GitHub Actions .. but if this email is related to that, it is an hour late
21:09:18 <truebrain> as the nightly ran an hour ago
21:09:20 <truebrain> I am so confused π
21:09:56 <truebrain> and emails from Steam for 2FA over email take FOR EVER to arrive .. which isn't uncommon, sadly ..
21:11:20 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:17:20 <truebrain> "Recent Login History" of Steam has this note:
21:17:21 <truebrain> Records are not available until at least 24 hours after they occur. Results update daily.
21:17:27 <truebrain> ...... I .... wuth?
21:17:46 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:22:08 <truebrain> okay, so this was our nightly, which triggere for the first time ever an "someone logged in to your account" email .. which is fine. It just took over an hour to arrive in my mailbox, which made me go: huh?!
21:22:12 <truebrain> but it seems to be fine ..
21:22:34 <truebrain> sadly, can only confirm tomorrow if it actually was, as the bloody "Recent Login" page is garbage
21:23:18 <_glx_> 24h delay for recent login is not the best idea of security
21:24:53 <truebrain> it is garbage, let's just call it what it is π
21:30:41 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:33:16 <FLHerne> one more pointless feature OTTD doesn't have yet
21:37:29 *** Wormnest has joined #openttd
21:55:18 <Beer> Hello! I just updated my dedicated servers to 13.4. THis reminds me I'm still applying my usual patches allowing native support for Heightmap on dedicated servers (CLI flag & restarting the game in the same mode on game ending). It's probably still hacky, but I managed to make them survive through the partial rewriting of the network code on yoru side.
21:55:50 <Beer> WOuld you this time be interested by another PR in which I'd dump those patches?
21:59:22 <talltyler> If it's more organized than a "dump" of patches, then yes! π
22:01:19 <talltyler> If it's a collection of unrelated changes, they would be separate PRs. We can provide some guidance on how best to break them up.
22:07:15 <Beer> I see 3 separate features. One I'm still unsure you'd be interested in
22:07:33 <Beer> I'll pop 2 branches in my fork and would you be in to have a look before any PR is initiated?
22:11:39 *** Eddi|zuHause has quit IRC (Remote host closed the connection)
22:12:17 *** Eddi|zuHause has joined #openttd
22:17:59 *** tokai|noir has joined #openttd
22:18:00 *** ChanServ sets mode: +v tokai|noir
22:25:01 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:49:13 <talltyler> You can open the PRs, itβs easier than poking around in your fork. Iβd say go for all three, and if itβs not suitable we can just close the PR. Itβs no big deal π
continue to next day β΅