diff options
author | Georg Pfuetzenreuter | 2024-09-21 18:40:29 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2024-09-28 19:33:18 +0200 |
commit | 0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e (patch) | |
tree | 3ba1171b3795f90ecabea7d217b56643dff2b3b9 /main.go | |
parent | cc322e87e62fa19dabfbddd937da477feb9f2516 (diff) | |
download | watbot-0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e.tar.gz watbot-0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e.tar.bz2 watbot-0a90b6e483bcf6d57030cc7f26f2a3b1a819b37e.zip |
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 <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |