Add pass to bouncer network attributes
This commit is contained in:
parent
db0f745193
commit
60c566e721
@ -220,6 +220,7 @@ Bouncers MUST recognise the following network attributes:
|
||||
* `nickname`: the nickname to use during registration.
|
||||
* `username`: the username to use during registration.
|
||||
* `realname`: the realname to use during registration.
|
||||
* `pass`: the server password (PASS) to use during registration.
|
||||
|
||||
TODO: more attributes
|
||||
|
||||
|
@ -2040,6 +2040,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
||||
|
||||
username, _ := attrs.GetTag("username")
|
||||
realname, _ := attrs.GetTag("realname")
|
||||
pass, _ := attrs.GetTag("pass")
|
||||
|
||||
// TODO: reject unknown attributes
|
||||
|
||||
@ -2048,6 +2049,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
||||
Nick: nick,
|
||||
Username: username,
|
||||
Realname: realname,
|
||||
Pass: pass,
|
||||
}
|
||||
network, err := dc.user.createNetwork(record)
|
||||
if err != nil {
|
||||
@ -2092,6 +2094,8 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
||||
record.Username = s
|
||||
case "realname":
|
||||
record.Realname = s
|
||||
case "pass":
|
||||
record.Pass = s
|
||||
default:
|
||||
return ircError{&irc.Message{
|
||||
Command: "FAIL",
|
||||
|
Loading…
Reference in New Issue
Block a user