From db0110393f70987c9b87643594d18df935ef91d5 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 4 Nov 2024 13:43:06 -0500 Subject: added the ability to use channels with password, fixes 35 --- utils.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 utils.go (limited to 'utils.go') diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..81c2f70 --- /dev/null +++ b/utils.go @@ -0,0 +1,11 @@ +package main + +import "github.com/lrstanley/girc" + +func IrcJoin(irc *girc.Client, channel []string) { + if len(channel) >= 0 && channel[0] == "" { + irc.Cmd.JoinKey(channel[0], channel[1]) + } else { + irc.Cmd.Join(channel[0]) + } +} -- cgit v1.2.3