summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2015-10-27 11:25:21 +0100
committerWim <wim@42.be>2015-10-27 11:25:21 +0100
commit693f1946b7ef34b430466d1de7dc9a0d445c3894 (patch)
tree9828dd2ae8b9519719b3b3eaeae425b02a6c19d4
parent8b6a00d1c58ee505fa1f5515d561eb909cb8063a (diff)
downloadmatterbridge-msglm-693f1946b7ef34b430466d1de7dc9a0d445c3894.tar.gz
matterbridge-msglm-693f1946b7ef34b430466d1de7dc9a0d445c3894.tar.bz2
matterbridge-msglm-693f1946b7ef34b430466d1de7dc9a0d445c3894.zip
Fix multiline messages
-rw-r--r--matterbridge.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/matterbridge.go b/matterbridge.go
index 4a36e80b..734904cf 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -85,7 +85,10 @@ func (b *Bridge) handleMatter() {
log.Println("received !users from", message.UserName)
b.i.SendRaw("NAMES " + b.Config.IRC.Channel)
}
- b.i.Privmsg(b.Config.IRC.Channel, message.UserName+": "+message.Text)
+ texts := strings.Split(message.Text, "\n")
+ for _, text := range texts {
+ b.i.Privmsg(b.Config.IRC.Channel, message.UserName+": "+text)
+ }
}
}