diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-02-07 03:28:30 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-02-07 03:28:30 +0000 |
commit | 3f65633fca2937671e7f54156a8b35662c3761bb (patch) | |
tree | 9cdc9557df95d48ada04f8ce9fb956f3593723fd | |
parent | added an image (diff) | |
download | milla-3f65633fca2937671e7f54156a8b35662c3761bb.tar.gz milla-3f65633fca2937671e7f54156a8b35662c3761bb.zip |
channel var can now accept a list
Diffstat (limited to '')
-rw-r--r-- | main.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -74,7 +74,10 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { } irc.Handlers.AddBg(girc.CONNECTED, func(c *girc.Client, e girc.Event) { - c.Cmd.Join(appConfig.IrcChannel) + channels := strings.Split(appConfig.IrcChannel, " ") + for _, channel := range channels { + c.Cmd.Join(channel) + } }) irc.Handlers.AddBg(girc.PRIVMSG, func(client *girc.Client, event girc.Event) { @@ -141,7 +144,6 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { fmt.Println(writer.String()) client.Cmd.ReplyTo(event, girc.Fmt("\033[0m"+writer.String())) - // client.Cmd.ReplyTo(event, girc.Fmt(ollamaResponse.Response)) } }) |