diff options
Diffstat (limited to 'bridge/irc/handlers.go')
-rw-r--r-- | bridge/irc/handlers.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go index 9089c9a9..aaaf42fb 100644 --- a/bridge/irc/handlers.go +++ b/bridge/irc/handlers.go @@ -170,7 +170,14 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) { if b.skipPrivMsg(event) { return } - rmsg := config.Message{Username: event.Source.Name, Channel: strings.ToLower(event.Params[0]), Account: b.Account, UserID: event.Source.Ident + "@" + event.Source.Host} + + rmsg := config.Message{ + Username: event.Source.Name, + Channel: strings.ToLower(event.Params[0]), + Account: b.Account, + UserID: event.Source.Ident + "@" + event.Source.Host, + } + b.Log.Debugf("== Receiving PRIVMSG: %s %s %#v", event.Source.Name, event.Last(), event) // set action event @@ -178,6 +185,11 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) { rmsg.Event = config.EventUserAction } + // set NOTICE event + if event.Command == "NOTICE" { + rmsg.Event = config.EventNoticeIRC + } + // strip action, we made an event if it was an action rmsg.Text += event.StripAction() |