From 0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sat, 21 Sep 2024 18:40:29 +0200 Subject: Implement automatic channel joining Avoid the need for an administrator to join the bot to channels by implementing a configuration option allowing the passing of channels the bot should always join to by itself upon startup. Signed-off-by: Georg Pfuetzenreuter --- main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 2ae52d0..c242571 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ type watConfig struct { Hosts []string `yaml:"hosts"` } `yaml:"admins"` Channels struct { + Join []string `yaml:"join"` Permitted []string `yaml:"permitted"` } `yaml:"channels"` Ignores struct { @@ -94,6 +95,7 @@ func main() { Name: config.Name, } watConfig := wat.WatConfig{ + AutoJoinChannels: config.Channels.Join, PermittedChannels: config.Channels.Permitted, IgnoredHosts: config.Ignores.Hosts, AdminHosts: config.Admins.Hosts, -- cgit v1.2.3