Return to “Scripting & Modding”

LTSL - pipes & sockets ?

#1
Will LTSL let us work with files and/or sockets?

Uses I'm considering:
- A custom log file where specific events are logged.
- A variation of the first, where an automatic html diary is generated by a mod.
- Sockets can be used to make modded multiplayer, or at least a cool proof of concept.
- And, I'd love the ability to write an IRC client or even a browser inside LT, so people can stay in touch with the community, without having to leave the game.

I'm sure there are many many more... So, please, can we have? :D :squirrel:


Edit: not to mention that sockets could be used to browse mod databases, get alerted of updates or even automatically download new versions. It should probably be enough to make socket(), bind(), connect() and listen() available through LTSL.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Re: LTSL - pipes & sockets ?

#2
TCP sockets open up a big can of worms regarding network security...
I see what you want to do Kato, but i thus word my concerns with opening up LT to the internet as a modding-only feature....

Nothing against pipes (as when pipes make LT problematic, your computer was problematic beforehand), they would make that custom control app for tablets that i want(ed) to make possible. ^^

Re: LTSL - pipes & sockets ?

#3
A socket in itself is harmless. Are you worried about some attacker getting access to your computer through LT?
If you limit hard disk access to a chrooted environment, you wouldn't have to worry about that.
Also, the scripts are human readable, so peer review is possible and will happen.

Or are you thinking something else?
Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Re: LTSL - pipes & sockets ?

#5
ah... well, don't have a panic attack then !
There's nothing wrong with sockets. Having sockets doesn't mean you'll need to worry about opening up an attack vector to your computer.

A socket can read or write. Most sockets used in mods will be the writing kind. They won't accept input all the time. It's the server-side script that would listen to client connections.
Hackers can't use these writing sockets to hack you, because the sockets aren't accepting any input. When they do, it's after a handshake, and it's established that the other party is trustworthy.

If you're really worried about this, I'm guessing you already took precautions. Having a decent (hardware) firewall like a router is a great way to not having to worry too much about opening ports for listening, since it's hard to bypass the router anyway. Besides that there are always the software firewalls that will alert you when an application is trying to make receive or initiate a connection.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Re: LTSL - pipes & sockets ?

#7
Yeah... compare it to a browser. A browser doesn't listen to connections per sé, it just opens a connection to a webserver, fetches what it needs and closes the connection again.

And with peer review, I really don't think a culture of exploitative scripts would happen on LT. :)
Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Re: LTSL - pipes & sockets ?

#9
The point about database access is interesting.

I'm wondering now how LT will store the vast reams of data about the universe of a game. Josh mentioned in a recent devlog that he was considering adding data structures to LTSL, and I suppose you could store and expose active game data that way (universe = big honkin' list of lists).

But it might be advantageous to handle data -- at least the big stuff -- through some kind of structured database. In that case, LTSL would need some way to make database calls. You could bake those into LTSL, but I suppose sockets would be another way, and they'd offer additional capabilities.

Regarding file handling, doesn't LTSL already have to be able to read data from files? Not directly, but through a built-in function?

Re: LTSL - pipes & sockets ?

#10
Flatfingers wrote:Regarding file handling, doesn't LTSL already have to be able to read data from files? Not directly, but through a built-in function?
Sure, it should already be able to handle files. But I don't know in how far it can be used by mods to read and write arbitrary files.
To me it would make sense to not let LTSL write to files outside of the mod or universe directory though. Not so much because I think it'll be abused, but because accidents happen. Secondly because I'd like my files together, and not spread over all kinds of structures modders could come up with. And, seeing as we're dealing with a cross platform game, it just makes sense. :)
Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Re: LTSL - pipes & sockets ?

#11
I asked Josh in IRC about what network functionality is visible to LTSL and he said currently there is none, but he will add it in post launch at the latest.

With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.
An idea that is not dangerous is unworthy of being called an idea at all. - Oscar Wilde

We often refuse to accept an idea merely because the tone of voice in which it has been expressed is unsympathetic to us. - Friedrich Nietzsche

Re: LTSL - pipes & sockets ?

#14
Kekasi wrote:With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.
Could simply have the configuration as constants at the top of the script.
"The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time." —Tom Cargill

Re: LTSL - pipes & sockets ?

#15
Kekasi wrote:I asked Josh in IRC about what network functionality is visible to LTSL and he said currently there is none, but he will add it in post launch at the latest.

With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.
Im pretty sure josh doesnt want his config variables spread over a hundred scripts but all stored in a nice little config file.

So we have (at least indirect) read access.

And as it would be a equal chore not being able to store changed configs we will have write access to files.

In sum im confident that we will have some kind of file access available

Online Now

Users browsing this forum: No registered users and 1 guest

cron