mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
40b7b6ee4b
Add IRC as a new channel for picoclaw, supporting server connections, channel joins, DMs, mention-based group triggers, and IRCv3 typing indicators. Uses ergochat/irc-go for connection management with SASL, NickServ, and automatic reconnection support. Closes #1137
17 lines
372 B
Go
17 lines
372 B
Go
package irc
|
|
|
|
import (
|
|
"github.com/sipeed/picoclaw/pkg/bus"
|
|
"github.com/sipeed/picoclaw/pkg/channels"
|
|
"github.com/sipeed/picoclaw/pkg/config"
|
|
)
|
|
|
|
func init() {
|
|
channels.RegisterFactory("irc", func(cfg *config.Config, b *bus.MessageBus) (channels.Channel, error) {
|
|
if !cfg.Channels.IRC.Enabled {
|
|
return nil, nil
|
|
}
|
|
return NewIRCChannel(cfg.Channels.IRC, b)
|
|
})
|
|
}
|