add echo-message to debug output for incoming echo messages

This commit is contained in:
Liam Stanley 2018-01-27 20:24:32 -05:00
parent 507c1bc866
commit 54806847f1

View File

@ -25,7 +25,11 @@ func (c *Client) RunHandlers(event *Event) {
isEcho := event.Source != nil && event.Source.Name == c.GetNick() && (event.Command == PRIVMSG || event.Command == NOTICE)
// Log the event.
c.debug.Print("< " + StripRaw(event.String()))
prefix := "< "
if isEcho {
prefix += "[echo-message] "
}
c.debug.Print(prefix + StripRaw(event.String()))
if c.Config.Out != nil && !isEcho {
if pretty, ok := event.Pretty(); ok {
fmt.Fprintln(c.Config.Out, StripRaw(pretty))