summaryrefslogtreecommitdiffstats
path: root/bridge/irc/irc.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/irc/irc.go')
-rw-r--r--bridge/irc/irc.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index aa46a6f1..6e5839bd 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -117,8 +117,13 @@ func (b *Birc) Disconnect() error {
return nil
}
-func (b *Birc) JoinChannel(channel string) error {
- b.i.Join(channel)
+func (b *Birc) JoinChannel(channel config.ChannelInfo) error {
+ if channel.Options.Key != "" {
+ flog.Debugf("using key %s for channel %s", channel.Options.Key, channel.Name)
+ b.i.Join(channel.Name + " " + channel.Options.Key)
+ } else {
+ b.i.Join(channel.Name)
+ }
return nil
}