aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
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])
+ }
+}