From ed95f09725c373f1c3069c4497f36e3ee3cef611 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 15 Apr 2016 19:08:52 +1000 Subject: [PATCH] Fix clients no longer being able to send commands after a single command errors out --- CHANGELOG.md | 1 + irc/client.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7cd63bc..5017da71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,3 +31,4 @@ Initial release of Oragono! * NICK: Improve nickname handling, restrict nicknames that break the protocol. * WHOIS: Include the required `` param on `RPL_ENDOFWHOIS`. * WHOIS: Hide hidden channels in WHOIS responses. +* Fixed clients no longer being able to send commands after a single command errored out. diff --git a/irc/client.go b/irc/client.go index 17bf557f..1cbdf73a 100644 --- a/irc/client.go +++ b/irc/client.go @@ -67,18 +67,19 @@ func (client *Client) run() { client.socket.conn.RemoteAddr()))) for err == nil { + //TODO(dan): does this read sockets correctly and split lines properly? (think that ZNC bug that kept happening with mammon) if line, err = client.socket.Read(); err != nil { command = NewQuitCommand("connection closed") } else if command, err = ParseCommand(line); err != nil { switch err { case ErrParseCommand: + //TODO(dan): why is this a notice? there's a proper numeric for this I swear client.Reply(RplNotice(client.server, client, NewText("failed to parse command"))) - - case NotEnoughArgsError: - // TODO } + // so the read loop will continue + err = nil continue } else if checkPass, ok := command.(checkPasswordCommand); ok {