Possible to open TCP connections?

Place to get help with not working mods / modding interface.
Post Reply
Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Possible to open TCP connections?

Post by Baughn »

I'd like to build a Factorio-to-IRC bridge, similar to EiraIRC.

This would require me to either load arbitrary C code (probably straight out), or at least open a TCP connection to the IRC server. Is that latter something I can do with the current API?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Possible to open TCP connections?

Post by orzelek »

Baughn wrote:I'd like to build a Factorio-to-IRC bridge, similar to EiraIRC.

This would require me to either load arbitrary C code (probably straight out), or at least open a TCP connection to the IRC server. Is that latter something I can do with the current API?
Any network actions are prohibited and currently there is no plan to allow them I think.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Possible to open TCP connections?

Post by aubergine18 »

As an end-user, I'd find any game that allows this level of modding (either access to file system or network) to be very dubious. I've seen some games that do allow this level of modding (eg. cities skylines) but the game devs have to check the source of every single non-content mod (ie. any code-based mods) which is a lot of extra work.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: Possible to open TCP connections?

Post by Baughn »

aubergine18 wrote:As an end-user, I'd find any game that allows this level of modding (either access to file system or network) to be very dubious. I've seen some games that do allow this level of modding (eg. cities skylines) but the game devs have to check the source of every single non-content mod (ie. any code-based mods) which is a lot of extra work.
If the game were open-source, I'd send a pull request to enable just the IRC bridge.

Since it's not... well, all I can do is hope for that level of modding ability. Network access, on its own, shouldn't be terribly dangerous; if necessary, it could be limited using a permissions system. *Not* being able to connect to IRC is a massive drag, though.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Possible to open TCP connections?

Post by aubergine18 »

You can write files via the API - why not make something that tails a file and sends new entries to IRC?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: Possible to open TCP connections?

Post by Baughn »

aubergine18 wrote:You can write files via the API - why not make something that tails a file and sends new entries to IRC?
It turns into a rube-goldberg machine. I'd need to combine it with ii, or something.

Which is fine for *me*, but makes it a lot harder to contemplate offering it for others to use.

User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: Possible to open TCP connections?

Post by mickael9 »

Not sure if that's the exact use case you're looking for but if you're interested, I already made a Factorio-IRC bridge via log parsing/RCON commands: viewtopic.php?f=133&t=29019

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: Possible to open TCP connections?

Post by Baughn »

mickael9 wrote:Not sure if that's the exact use case you're looking for but if you're interested, I already made a Factorio-IRC bridge via log parsing/RCON commands: viewtopic.php?f=133&t=29019
Well, it's exactly the sort of rube-goldberg machine I was hoping not to have to write.

Which means I don't have to write it. I absolutely will use it. Thanks! ^_^

Post Reply

Return to “Modding help”