Handle downstream JOIN/PART with multiple channel names
Closes: https://todo.sr.ht/~emersion/soju/19
This commit is contained in:
parent
21241c2009
commit
146906ef6b
@ -833,11 +833,12 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
||||
uc.SendMessage(msg)
|
||||
})
|
||||
case "JOIN", "PART":
|
||||
var name string
|
||||
if err := parseMessageParams(msg, &name); err != nil {
|
||||
var names string
|
||||
if err := parseMessageParams(msg, &names); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, name := range strings.Split(names, ",") {
|
||||
uc, upstreamName, err := dc.unmarshalEntity(name)
|
||||
if err != nil {
|
||||
return ircError{&irc.Message{
|
||||
@ -864,6 +865,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
||||
dc.logger.Printf("failed to delete channel %q in DB: %v", upstreamName, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
case "MODE":
|
||||
var name string
|
||||
if err := parseMessageParams(msg, &name); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user