Changeset 28 in code for trunk/downstream.go


Ignore:
Timestamp:
Feb 6, 2020, 9:22:14 PM (5 years ago)
Author:
contact
Message:

De-duplicate downstream QUIT handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r27 r28  
    129129func (c *downstreamConn) handleMessage(msg *irc.Message) error {
    130130        switch msg.Command {
     131        case "QUIT":
     132                return c.Close()
    131133        case "PING":
    132134                // TODO: handle params
     
    158160                c.username = "~" + msg.Params[0]
    159161                c.realname = msg.Params[3]
    160         case "QUIT":
    161                 return c.Close()
    162162        default:
    163163                c.logger.Printf("unhandled message: %v", msg)
     
    190190        c.WriteMessage(&irc.Message{
    191191                Command: irc.RPL_MYINFO,
    192                 Params:  []string{c.nick, c.srv.Hostname, "unknown", "aiwroO", "OovaimnqpsrtklbeI"},
     192                Params:  []string{c.nick, c.srv.Hostname, "jounce", "aiwroO", "OovaimnqpsrtklbeI"},
    193193        })
    194194
     
    211211                        },
    212212                }}
    213         case "QUIT":
    214                 return c.Close()
    215213        default:
    216214                c.logger.Printf("unhandled message: %v", msg)
Note: See TracChangeset for help on using the changeset viewer.