diff options
author | Wim <wim@42.be> | 2018-01-28 19:15:13 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-01-28 19:15:13 +0100 |
commit | 6bd808ce91bd18fc98869229cf10e07552772b09 (patch) | |
tree | aa8b5bef0542279a9b607f97aedaf07f8ddecf99 /gateway/gateway.go | |
parent | a5c143bc46f5b501342c0841c272eb3500af7d45 (diff) | |
download | matterbridge-msglm-6bd808ce91bd18fc98869229cf10e07552772b09.tar.gz matterbridge-msglm-6bd808ce91bd18fc98869229cf10e07552772b09.tar.bz2 matterbridge-msglm-6bd808ce91bd18fc98869229cf10e07552772b09.zip |
Lowercase irc channels in config. Closes #348
Diffstat (limited to 'gateway/gateway.go')
-rw-r--r-- | gateway/gateway.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 6535c60c..6e327686 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -94,6 +94,10 @@ func (gw *Gateway) mapChannelConfig(cfg []config.Bridge, direction string) { if isApi(br.Account) { br.Channel = "api" } + // make sure to lowercase irc channels in config #348 + if strings.HasPrefix(br.Account, "irc.") { + br.Channel = strings.ToLower(br.Channel) + } ID := br.Channel + br.Account if _, ok := gw.Channels[ID]; !ok { channel := &config.ChannelInfo{Name: br.Channel, Direction: direction, ID: ID, Options: br.Options, Account: br.Account, |