mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix: connecting clients receive METADATA, not RPL_KEYVALUE
This commit is contained in:
parent
294c586ac3
commit
2c7a423339
2 changed files with 11 additions and 1 deletions
|
|
@ -3374,6 +3374,16 @@ func playMetadataList(rb *ResponseBuffer, nick, target string, values map[string
|
|||
}
|
||||
}
|
||||
|
||||
func playMetadataVerbBatch(rb *ResponseBuffer, target string, values map[string]string) {
|
||||
batchId := rb.StartNestedBatch("metadata", target)
|
||||
defer rb.EndNestedBatch(batchId)
|
||||
|
||||
for key, val := range values {
|
||||
visibility := "*"
|
||||
rb.Add(nil, rb.session.client.server.name, "METADATA", target, key, visibility, val)
|
||||
}
|
||||
}
|
||||
|
||||
// REHASH
|
||||
func rehashHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool {
|
||||
nick := client.Nick()
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ func (server *Server) playRegistrationBurst(session *Session) {
|
|||
server.RplISupport(c, rb)
|
||||
}
|
||||
if session.capabilities.Has(caps.Metadata) {
|
||||
playMetadataList(rb, d.nick, d.nick, c.ListMetadata())
|
||||
playMetadataVerbBatch(rb, d.nick, c.ListMetadata())
|
||||
}
|
||||
if d.account != "" && session.capabilities.Has(caps.Persistence) {
|
||||
reportPersistenceStatus(c, rb, false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue