diff options
author | Wim <wim@42.be> | 2018-03-06 21:19:00 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-03-06 21:19:00 +0100 |
commit | a284a228a32185e6b7af7459a2d69eb14d6516d9 (patch) | |
tree | 63462a802eac5d85704b945512350261bdd01235 | |
parent | 2133e0d1bed0bdc2ac10742c0bcf6b0b17a4d175 (diff) | |
download | matterbridge-msglm-a284a228a32185e6b7af7459a2d69eb14d6516d9.tar.gz matterbridge-msglm-a284a228a32185e6b7af7459a2d69eb14d6516d9.tar.bz2 matterbridge-msglm-a284a228a32185e6b7af7459a2d69eb14d6516d9.zip |
Get the correct config values (gateway)
-rw-r--r-- | gateway/gateway.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index c8b1d689..55826652 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -220,12 +220,12 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM } // only relay join/part when configured - if msg.Event == config.EVENT_JOIN_LEAVE && !gw.Bridges[dest.Account].Config.GetBool("ShowJoinPart") { + if msg.Event == config.EVENT_JOIN_LEAVE && !gw.Bridges[dest.Account].GetBool("ShowJoinPart") { return brMsgIDs } // only relay topic change when configured - if msg.Event == config.EVENT_TOPIC_CHANGE && !gw.Bridges[dest.Account].Config.GetBool("ShowTopicChange") { + if msg.Event == config.EVENT_TOPIC_CHANGE && !gw.Bridges[dest.Account].GetBool("ShowTopicChange") { return brMsgIDs } @@ -330,7 +330,7 @@ func (gw *Gateway) ignoreMessage(msg *config.Message) bool { func (gw *Gateway) modifyUsername(msg config.Message, dest *bridge.Bridge) string { br := gw.Bridges[msg.Account] msg.Protocol = br.Protocol - if gw.Config.General.StripNick || dest.Config.GetBool("StripNick") { + if gw.Config.General.StripNick || dest.GetBool("StripNick") { re := regexp.MustCompile("[^a-zA-Z0-9]+") msg.Username = re.ReplaceAllString(msg.Username, "") } |