Pass-through NICK messages for other users
This commit is contained in:
parent
660e4c035d
commit
7883e8fa23
10
upstream.go
10
upstream.go
@ -206,6 +206,16 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
|||||||
ch.Members[newNick] = membership
|
ch.Members[newNick] = membership
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if msg.Prefix.Name != uc.nick {
|
||||||
|
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||||
|
dc.SendMessage(&irc.Message{
|
||||||
|
Prefix: dc.marshalUserPrefix(uc, msg.Prefix),
|
||||||
|
Command: "NICK",
|
||||||
|
Params: []string{newNick},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
case "JOIN":
|
case "JOIN":
|
||||||
if msg.Prefix == nil {
|
if msg.Prefix == nil {
|
||||||
return fmt.Errorf("expected a prefix")
|
return fmt.Errorf("expected a prefix")
|
||||||
|
Loading…
Reference in New Issue
Block a user