4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-04 19:27:45 +00:00

Update vendor lrstanley/girc

This commit is contained in:
Wim
2018-05-09 22:48:39 +02:00
parent 529b188164
commit 521a7ed7b0
10 changed files with 203 additions and 846 deletions

View File

@ -22,19 +22,28 @@ func (c *Client) RunHandlers(event *Event) {
}
// Log the event.
c.debug.Print("< " + StripRaw(event.String()))
prefix := "< "
if event.Echo {
prefix += "[echo-message] "
}
c.debug.Print(prefix + StripRaw(event.String()))
if c.Config.Out != nil {
if pretty, ok := event.Pretty(); ok {
fmt.Fprintln(c.Config.Out, StripRaw(pretty))
}
}
// Background handlers first.
// Background handlers first. If the event is an echo-message, then only
// send the echo version to ALL_EVENTS.
c.Handlers.exec(ALL_EVENTS, true, c, event.Copy())
c.Handlers.exec(event.Command, true, c, event.Copy())
if !event.Echo {
c.Handlers.exec(event.Command, true, c, event.Copy())
}
c.Handlers.exec(ALL_EVENTS, false, c, event.Copy())
c.Handlers.exec(event.Command, false, c, event.Copy())
if !event.Echo {
c.Handlers.exec(event.Command, false, c, event.Copy())
}
// Check if it's a CTCP.
if ctcp := decodeCTCP(event.Copy()); ctcp != nil {