Forward ISUPPORT NETWORK token
This commit is contained in:
parent
c4d9e6822d
commit
62f1207437
@ -879,6 +879,10 @@ func (dc *downstreamConn) welcome() error {
|
||||
fmt.Sprintf("CHATHISTORY=%v", dc.srv.HistoryLimit),
|
||||
}
|
||||
|
||||
if uc := dc.upstream(); uc != nil && uc.networkName != "" {
|
||||
isupport = append(isupport, fmt.Sprintf("NETWORK=%v", uc.networkName))
|
||||
}
|
||||
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
Command: irc.RPL_WELCOME,
|
||||
@ -901,9 +905,9 @@ func (dc *downstreamConn) welcome() error {
|
||||
})
|
||||
// TODO: other RPL_ISUPPORT tokens
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
Prefix: dc.srv.prefix(),
|
||||
Command: irc.RPL_ISUPPORT,
|
||||
Params: append(append([]string{dc.nick}, isupport...), "are supported"),
|
||||
Params: append(append([]string{dc.nick}, isupport...), "are supported"),
|
||||
})
|
||||
dc.SendMessage(&irc.Message{
|
||||
Prefix: dc.srv.prefix(),
|
||||
|
@ -78,6 +78,7 @@ type upstreamConn struct {
|
||||
user *user
|
||||
|
||||
serverName string
|
||||
networkName string
|
||||
availableUserModes string
|
||||
availableChannelModes map[byte]channelModeType
|
||||
availableChannelTypes string
|
||||
@ -670,6 +671,8 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
||||
}
|
||||
uc.availableMemberships = memberships
|
||||
}
|
||||
case "NETWORK":
|
||||
uc.networkName = value
|
||||
}
|
||||
} else {
|
||||
// TODO: handle ISUPPORT negations
|
||||
|
Loading…
Reference in New Issue
Block a user