diff --git a/irc.go b/irc.go index 2aa6c40..3e5b717 100644 --- a/irc.go +++ b/irc.go @@ -69,6 +69,10 @@ func (irc *Connection) readLoop() { break } + if irc.Debug { + irc.Log.Printf("<-- %s\n", strings.TrimSpace(msg)) + } + irc.lastMessage = time.Now() msg = msg[:len(msg)-2] //Remove \r\n event := &Event{Raw: msg} @@ -97,10 +101,6 @@ func (irc *Connection) readLoop() { } /* XXX: len(args) == 0: args should be empty */ - if irc.VerboseReadLoop { - irc.Log.Println(event.Raw) - } - irc.RunCallbacks(event) } } @@ -122,7 +122,7 @@ func (irc *Connection) writeLoop() { } if irc.Debug { - irc.Log.Printf("--> %s\n", b) + irc.Log.Printf("--> %s\n", strings.TrimSpace(b)) } // Set a write deadline based on the time out diff --git a/irc_struct.go b/irc_struct.go index 6f7a259..161c6a2 100644 --- a/irc_struct.go +++ b/irc_struct.go @@ -38,7 +38,6 @@ type Connection struct { lastMessage time.Time VerboseCallbackHandler bool - VerboseReadLoop bool Log *log.Logger stopped bool