- Timestamp:
- Mar 16, 2020, 8:32:18 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.md
r98 r100 12 12 13 13 sqlite3 soju.db <schema.sql 14 go run ./cmd/sojuctl create-user soju14 go run ./cmd/sojuctl create-user <username> 15 15 go run ./cmd/soju 16 16 17 Then connect with username ` soju@chat.freenode.net` and join `#soju`.17 Then connect with username `<username>@chat.freenode.net` and join `#soju`. 18 18 19 19 ## Contributing -
trunk/downstream.go
r98 r100 62 62 closed chan struct{} 63 63 64 registered bool 65 user *user 66 nick string 67 username string 68 realname string 69 password string // empty after authentication 70 network *network // can be nil 64 registered bool 65 user *user 66 nick string 67 username string 68 rawUsername string 69 realname string 70 password string // empty after authentication 71 network *network // can be nil 71 72 } 72 73 … … 324 325 return err 325 326 } 326 dc. username = "~" +username327 dc.rawUsername = username 327 328 case "PASS": 328 329 if err := parseMessageParams(msg, &dc.password); err != nil { … … 333 334 return newUnknownCommandError(msg.Command) 334 335 } 335 if dc. username != "" && dc.nick != "" {336 if dc.rawUsername != "" && dc.nick != "" { 336 337 return dc.register() 337 338 } … … 349 350 350 351 func (dc *downstreamConn) register() error { 351 username := strings.TrimPrefix(dc.username, "~")352 username := dc.rawUsername 352 353 var networkName string 353 354 if i := strings.LastIndexAny(username, "/@"); i >= 0 { … … 357 358 username = username[:i] 358 359 } 360 dc.username = "~" + username 359 361 360 362 password := dc.password
Note:
See TracChangeset
for help on using the changeset viewer.