diff options
author | @42wim <wim@42.be> | 2016-03-18 12:50:52 +0100 |
---|---|---|
committer | @42wim <wim@42.be> | 2016-03-18 12:50:52 +0100 |
commit | 4759ee6132e1a8ec1274870b5cf20ae36d02996c (patch) | |
tree | bf9a754911ca0c3a0199448e3ebc737b535f6e7d /matterbridge.go | |
parent | a64deb1238ac9684a8eb2e3f051e41e07b955394 (diff) | |
parent | 5ec94fdb4356df1be68a107f0ac142d44530b334 (diff) | |
download | matterbridge-msglm-4759ee6132e1a8ec1274870b5cf20ae36d02996c.tar.gz matterbridge-msglm-4759ee6132e1a8ec1274870b5cf20ae36d02996c.tar.bz2 matterbridge-msglm-4759ee6132e1a8ec1274870b5cf20ae36d02996c.zip |
Merge pull request #12 from fdevibe/msgprefix
Add config option to prefix messages (IRC->MM) with nick
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/matterbridge.go b/matterbridge.go index 6cf4ea2d..4302cf17 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -92,8 +92,12 @@ func (b *Bridge) SendType(nick string, message string, channel string, mtype str matterMessage := matterhook.OMessage{IconURL: b.Config.Mattermost.IconURL} matterMessage.Channel = channel matterMessage.UserName = nick - matterMessage.Text = message matterMessage.Type = mtype + if (b.Config.IRC.PrefixMessagesWithNick) { + matterMessage.Text = nick + ": " + message + } else { + matterMessage.Text = message + } err := b.m.Send(matterMessage) if err != nil { log.Println(err) |