mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-14 16:43:36 -07:00
Fix clients no longer being able to send commands after a single command errors out
This commit is contained in:
@@ -31,3 +31,4 @@ Initial release of Oragono!
|
||||
* NICK: Improve nickname handling, restrict nicknames that break the protocol.
|
||||
* WHOIS: Include the required `<nick>` 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.
|
||||
|
||||
+4
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user