aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
committerterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
commitdb0110393f70987c9b87643594d18df935ef91d5 (patch)
treeb61219f1d4238f4b5ad1d3d2b4d8d611115a0f11 /utils.go
parentadded openrouter as a provider (diff)
downloadmilla-db0110393f70987c9b87643594d18df935ef91d5.tar.gz
milla-db0110393f70987c9b87643594d18df935ef91d5.zip
added the ability to use channels with password, fixes 35
Diffstat (limited to '')
-rw-r--r--utils.go11
1 files changed, 11 insertions, 0 deletions
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])
+ }
+}