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