Bidirectional IRC bridge for Factorio
Project description
FactoIRC is a bidirectional IRC bridge between Factorio and IRC. It comes as a plugin for the irc3 python module.
It can join one or more channels and forward messages back and forth between IRC and Factorio.
Some IRC commands are also provided :
!rcon: Execute an RCON command and return the result.
!players: Get the list of the currently online players.
FactoIRC uses the RCON protocol introduced in Factorio 0.13 to forward messages from IRC to Factorio.
Forwarding Factorio chat messages to IRC requires access to the Factorio server output which can be done with two methods depending on your setup.
Installation
You’ll need to have Python 3.5 (or later) which can be obtained through your distribution’s package manager or downloaded from https://www.python.org/ (for Windows users).
Once Python 3.5 is installed, FactoIRC can be installed using
$ pip3 install factoirc
Configuration
Configuration is done using the config.ini file. A config.example.ini file is provided as an example.
Depending on your setup, you will have to use either the stdin or the systemd method.
Using stdin method
Unless you’re running your Factorio server on a Linux machine using systemd, this is the method you’ll use.
You will need to connect the factorio server output to the FactoIRC bot.
This can be achieved using a command such as:
$ factorio --rcon-port=27015 --rcon-password=password --start-server=save.zip | irc3 config.ini
Alternatively, you might want to separate execution of Factorio and the bot using an intermediate log file:
$ factorio ... > log.txt
$ irc3 config.ini < log.txt
Warning: do NOT use the factorio-current.log file created by Factorio, as it does not contain the chat log.
Using systemd method
If your Factorio server runs under systemd (only for Linux machines), FactoIRC can directly access the logs from the systemd journal. You’ll need the following options in your configuration file:
[factoirc]
method = systemd
unit = factorio.service
For this method to work, the python-systemd module is required and can be installed via pip:
$ pip3 install python-systemd
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file factoirc-0.2.tar.gz
.
File metadata
- Download URL: factoirc-0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 997de06a8b9c00a3336c9358257a354b51b680d420b9db2d6ddd944726102bd3 |
|
MD5 | 4ac3bf146c93b82eea699bbd3fb9b2f6 |
|
BLAKE2b-256 | 658d4be3c206feddd66d6f7a0c788976002d0b2313373222849d2ea9c34f5661 |
File details
Details for the file factoirc-0.2-py3-none-any.whl
.
File metadata
- Download URL: factoirc-0.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8b73d83e2e899cc311d7b8fc21bfdb818d265f232b7ce4ee58721ca74e7f2dc |
|
MD5 | d364cf2beababe73cf0161ccd07e0edc |
|
BLAKE2b-256 | 3e55208f30cd69e3942093bab8a5c375c4fb9f68551e8c795dbd5c48d332217c |