Sofia is a lightweight IRC bot written in Go. It supports:
- SASL authentication
- Link title fetching (including YouTube)
- RSS looping (modular)
- Sending messages directly from terminal (stdin)
- Configuration via
.inifile
Copy config.ini.example to config.ini and edit the file:
[sasl]
sasl = true
user = your-sasl-username
password = your-sasl-password
[irc]
server = irc.libera.chat:6697
nickname = sofiaaa
username = SofiaPertama
realname = Ratu Sofia
channel = `##sofia`
[github]
enabled = true
owner = Ryuuusuke
repo = SofiaMake sure to wrap the
channelvalue in backticks (`) so that the#character is not treated as a comment by the parser.
Run directly with:
go run main.goOr build it first:
go build -o sofia .
./sofiaType directly into the terminal where the bot is running to send a message to the configured IRC channel.
- When someone posts a link in the channel, the bot will try to fetch the page title automatically.
- YouTube links are fetched using the YouTube oEmbed API.
- For regular webpages, the bot uses
chromedp(headless Chrome via Go) to extract the<title>.
You can add your own RSS modules under the rss/ folder.
The bot is modular and supports custom RSS loops tailored to your needs.
.
├── main.go # Entry point
├── config.ini # User-provided config file
├── stdin/ # Module for stdin input
├── rss/ # RSS handler module
└── go.mod # Go module file
go-ini/ini- For parsing.iniconfiguration fileschromedp- For fetching web page titles via headless Chrome- Go standard libraries (
net,bufio,tls,regexp, etc.)
This project is licensed under the BSD 3-Clause License.
See the LICENSE file for full details.