aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-11-04 19:06:58 +0000
committerterminaldweller <devi@terminaldweller.com>2024-11-04 19:06:58 +0000
commit5fc17959713011884ce7023b53e3d62931f7e877 (patch)
tree9dbb6ae13f095856a54b068772149595e6d3234d
parentadded the ability to use channels with password, fixes 35 (diff)
downloadmilla-5fc17959713011884ce7023b53e3d62931f7e877.tar.gz
milla-5fc17959713011884ce7023b53e3d62931f7e877.zip
fixed the wrong condition
Diffstat (limited to '')
-rw-r--r--utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.go b/utils.go
index 81c2f70..e09456e 100644
--- a/utils.go
+++ b/utils.go
@@ -3,7 +3,7 @@ package main
import "github.com/lrstanley/girc"
func IrcJoin(irc *girc.Client, channel []string) {
- if len(channel) >= 0 && channel[0] == "" {
+ if len(channel) > 1 && channel[1] != "" {
irc.Cmd.JoinKey(channel[0], channel[1])
} else {
irc.Cmd.Join(channel[0])