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:
17
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
17
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
@ -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 {
|
||||
|
Reference in New Issue
Block a user