summaryrefslogtreecommitdiffstats
path: root/bridge/irc
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-12-07 22:07:45 +0100
committerWim <wim@42.be>2017-12-07 22:09:01 +0100
commit1de64f3f61b7aa1cdd14e6e6a9c1c809b032cf4b (patch)
tree10cfb0e2e7b312487138e00e57b61847e4120649 /bridge/irc
parent59e55cfbd5cc3c82236c5e8b95e5baff256f7143 (diff)
downloadmatterbridge-msglm-1de64f3f61b7aa1cdd14e6e6a9c1c809b032cf4b.tar.gz
matterbridge-msglm-1de64f3f61b7aa1cdd14e6e6a9c1c809b032cf4b.tar.bz2
matterbridge-msglm-1de64f3f61b7aa1cdd14e6e6a9c1c809b032cf4b.zip
Fix irc ACTION regression (irc). Closes #306
Diffstat (limited to 'bridge/irc')
-rw-r--r--bridge/irc/irc.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 4fd5a8a2..0a24ec75 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -327,11 +327,10 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) {
rmsg := config.Message{Username: event.Source.Name, Channel: event.Params[0], Account: b.Account, UserID: event.Source.Ident + "@" + event.Source.Host}
flog.Debugf("handlePrivMsg() %s %s %#v", event.Source.Name, event.Trailing, event)
msg := ""
- if event.Command == "CTCP_ACTION" {
- // msg = event.Source.Name + " "
+ if event.IsAction() {
rmsg.Event = config.EVENT_USER_ACTION
}
- msg += event.Trailing
+ msg += event.StripAction()
// strip IRC colors
re := regexp.MustCompile(`[[:cntrl:]](?:\d{1,2}(?:,\d{1,2})?)?`)
msg = re.ReplaceAllString(msg, "")