Changeset 342 in code for trunk/upstream.go


Ignore:
Timestamp:
Jun 29, 2020, 3:52:49 PM (5 years ago)
Author:
contact
Message:

Handle registration failures

References: https://todo.sr.ht/~emersion/soju/30

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r338 r342  
    13361336        case irc.RPL_STATSVLINE, rpl_statsping, irc.RPL_STATSBLINE, irc.RPL_STATSDLINE:
    13371337                // Ignore
     1338        case irc.ERR_PASSWDMISMATCH, irc.ERR_ERRONEUSNICKNAME, irc.ERR_NICKNAMEINUSE, irc.ERR_NICKCOLLISION, irc.ERR_UNAVAILRESOURCE:
     1339                if !uc.registered {
     1340                        return fmt.Errorf("registration failed: %v", msg.Params[len(msg.Params) - 1])
     1341                }
     1342                fallthrough
    13381343        default:
    13391344                uc.logger.Printf("unhandled message: %v", msg)
Note: See TracChangeset for help on using the changeset viewer.