Index: /trunk/downstream.go
===================================================================
--- /trunk/downstream.go	(revision 124)
+++ /trunk/downstream.go	(revision 125)
@@ -398,5 +398,5 @@
 		if !dc.caps["sasl"] {
 			return ircError{&irc.Message{
-				Command: err_saslfail,
+				Command: irc.ERR_SASLFAIL,
 				Params:  []string{"*", "AUTHENTICATE requires the \"sasl\" capability to be enabled"},
 			}}
@@ -404,5 +404,5 @@
 		if len(msg.Params) == 0 {
 			return ircError{&irc.Message{
-				Command: err_saslfail,
+				Command: irc.ERR_SASLFAIL,
 				Params:  []string{"*", "Missing AUTHENTICATE argument"},
 			}}
@@ -410,5 +410,5 @@
 		if dc.nick == "" {
 			return ircError{&irc.Message{
-				Command: err_saslfail,
+				Command: irc.ERR_SASLFAIL,
 				Params:  []string{"*", "Expected NICK command before AUTHENTICATE"},
 			}}
@@ -425,5 +425,5 @@
 			default:
 				return ircError{&irc.Message{
-					Command: err_saslfail,
+					Command: irc.ERR_SASLFAIL,
 					Params:  []string{"*", fmt.Sprintf("Unsupported SASL mechanism %q", mech)},
 				}}
@@ -432,5 +432,5 @@
 			dc.saslServer = nil
 			return ircError{&irc.Message{
-				Command: err_saslaborted,
+				Command: irc.ERR_SASLABORTED,
 				Params:  []string{"*", "SASL authentication aborted"},
 			}}
@@ -444,5 +444,5 @@
 				dc.saslServer = nil
 				return ircError{&irc.Message{
-					Command: err_saslfail,
+					Command: irc.ERR_SASLFAIL,
 					Params:  []string{"*", "Invalid base64-encoded response"},
 				}}
@@ -455,5 +455,5 @@
 			if ircErr, ok := err.(ircError); ok && ircErr.Message.Command == irc.ERR_PASSWDMISMATCH {
 				return ircError{&irc.Message{
-					Command: err_saslfail,
+					Command: irc.ERR_SASLFAIL,
 					Params:  []string{"*", ircErr.Message.Params[1]},
 				}}
@@ -461,5 +461,5 @@
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
-				Command: err_saslfail,
+				Command: irc.ERR_SASLFAIL,
 				Params:  []string{"*", "SASL error"},
 			})
@@ -469,10 +469,10 @@
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
-				Command: rpl_loggedin,
+				Command: irc.RPL_LOGGEDIN,
 				Params:  []string{dc.nick, dc.nick, dc.user.Username, "You are now logged in"},
 			})
 			dc.SendMessage(&irc.Message{
 				Prefix:  dc.srv.prefix(),
-				Command: rpl_saslsuccess,
+				Command: irc.RPL_SASLSUCCESS,
 				Params:  []string{dc.nick, "SASL authentication successful"},
 			})
Index: /trunk/go.mod
===================================================================
--- /trunk/go.mod	(revision 124)
+++ /trunk/go.mod	(revision 125)
@@ -7,6 +7,6 @@
 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 	github.com/mattn/go-sqlite3 v2.0.3+incompatible
-	golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
-	golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
-	gopkg.in/irc.v3 v3.1.1
+	golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6
+	golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d // indirect
+	gopkg.in/irc.v3 v3.1.2
 )
Index: /trunk/go.sum
===================================================================
--- /trunk/go.sum	(revision 124)
+++ /trunk/go.sum	(revision 125)
@@ -13,17 +13,17 @@
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 h1:QmwruyY+bKbDDL0BaglrbZABEali68eoMFhTZpCjYVA=
-golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww=
+golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44=
+golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/irc.v3 v3.1.1 h1:o7Bq9EvyA0tLI1patP/DkhaxpbGVqaIsdRYijLrQcYc=
-gopkg.in/irc.v3 v3.1.1/go.mod h1:shO2gz8+PVeS+4E6GAny88Z0YVVQSxQghdrMVGQsR9s=
+gopkg.in/irc.v3 v3.1.2 h1:TruRvpbZ9QrE+ZxKeWxDdA2mlMajBczQ7ApZi/S3+7k=
+gopkg.in/irc.v3 v3.1.2/go.mod h1:shO2gz8+PVeS+4E6GAny88Z0YVVQSxQghdrMVGQsR9s=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
Index: /trunk/irc.go
===================================================================
--- /trunk/irc.go	(revision 124)
+++ /trunk/irc.go	(revision 125)
@@ -14,13 +14,4 @@
 	rpl_topicwhotime  = "333"
 	err_invalidcapcmd = "410"
-	rpl_loggedin      = "900"
-	rpl_loggedout     = "901"
-	err_nicklocked    = "902"
-	rpl_saslsuccess   = "903"
-	err_saslfail      = "904"
-	err_sasltoolong   = "905"
-	err_saslaborted   = "906"
-	err_saslalready   = "907"
-	rpl_saslmechs     = "908"
 )
 
Index: /trunk/upstream.go
===================================================================
--- /trunk/upstream.go	(revision 124)
+++ /trunk/upstream.go	(revision 125)
@@ -297,5 +297,5 @@
 			Params:  []string{respStr},
 		})
-	case rpl_loggedin:
+	case irc.RPL_LOGGEDIN:
 		var account string
 		if err := parseMessageParams(msg, nil, nil, &account); err != nil {
@@ -303,7 +303,7 @@
 		}
 		uc.logger.Printf("logged in with account %q", account)
-	case rpl_loggedout:
+	case irc.RPL_LOGGEDOUT:
 		uc.logger.Printf("logged out")
-	case err_nicklocked, rpl_saslsuccess, err_saslfail, err_sasltoolong, err_saslaborted:
+	case irc.ERR_NICKLOCKED, irc.RPL_SASLSUCCESS, irc.ERR_SASLFAIL, irc.ERR_SASLTOOLONG, irc.ERR_SASLABORTED:
 		var info string
 		if err := parseMessageParams(msg, nil, &info); err != nil {
@@ -311,9 +311,9 @@
 		}
 		switch msg.Command {
-		case err_nicklocked:
+		case irc.ERR_NICKLOCKED:
 			uc.logger.Printf("invalid nick used with SASL authentication: %v", info)
-		case err_saslfail:
+		case irc.ERR_SASLFAIL:
 			uc.logger.Printf("SASL authentication failed: %v", info)
-		case err_sasltoolong:
+		case irc.ERR_SASLTOOLONG:
 			uc.logger.Printf("SASL message too long: %v", info)
 		}
