diff options
| author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 21:43:55 +0200 |
|---|---|---|
| committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 21:43:55 +0200 |
| commit | ca56268c5aa99c99ebc9dcdbd8dc3c6913fda6ef (patch) | |
| tree | 3664138b5b6977c960964f81420b9987e1fa6f12 /irc/states.go | |
| parent | Handle RPL_TOPICWHOTIME (diff) | |
irc: Use a bool instead of an error for validation
Diffstat (limited to 'irc/states.go')
| -rw-r--r-- | irc/states.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/irc/states.go b/irc/states.go index 0896dca..4e70ac3 100644 --- a/irc/states.go +++ b/irc/states.go @@ -194,14 +194,8 @@ func NewSession(conn io.ReadWriteCloser, params SessionParams) (s Session, err e for r.Scan() { line := r.Text() - msg, err := Tokenize(line) - if err != nil { - continue - } - - err = msg.Validate() - if err != nil { + if err != nil || !msg.IsValid() { continue } |
