feat(irc): support optional bot mode (#1246)

* feat(irc): set bot mode when the server supports it

See https://ircv3.net/specs/extensions/bot-mode.

* feat(irc): add a config option per network for bot mode
This commit is contained in:
Kuredant 2023-11-23 03:57:16 +09:00 committed by GitHub
parent c6c74c7f3b
commit f89a25d645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 67 additions and 10 deletions

View file

@ -45,6 +45,7 @@ type IrcNetwork struct {
InviteCommand string `json:"invite_command"`
UseBouncer bool `json:"use_bouncer"`
BouncerAddr string `json:"bouncer_addr"`
BotMode bool `json:"bot_mode"`
Channels []IrcChannel `json:"channels"`
Connected bool `json:"connected"`
ConnectedSince *time.Time `json:"connected_since"`
@ -63,6 +64,7 @@ type IrcNetworkWithHealth struct {
InviteCommand string `json:"invite_command"`
UseBouncer bool `json:"use_bouncer"`
BouncerAddr string `json:"bouncer_addr"`
BotMode bool `json:"bot_mode"`
CurrentNick string `json:"current_nick"`
PreferredNick string `json:"preferred_nick"`
Channels []ChannelWithHealth `json:"channels"`