@@ 282,6 282,7 @@ var passthroughIsupport = map[string]bool{
"NICKLEN": true,
"PREFIX": true,
"SAFELIST": true,
+ "STATUSMSG": true,
"TARGMAX": true,
"TOPICLEN": true,
"USERLEN": true,
@@ 199,6 199,7 @@ type upstreamConn struct {
availableUserModes string
availableChannelModes map[byte]channelModeType
availableChannelTypes string
+ availableStatusMsg string
availableMemberships []xirc.Membership
isupport map[string]*string
@@ 373,6 374,7 @@ func connectToUpstream(ctx context.Context, network *network) (*upstreamConn, er
batches: make(map[string]upstreamBatch),
serverPrefix: &irc.Prefix{Name: "*"},
availableChannelTypes: stdChannelTypes,
+ availableStatusMsg: "",
availableChannelModes: stdChannelModes,
availableMemberships: stdMemberships,
isupport: make(map[string]*string),
@@ 632,6 634,9 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
}
}
+ // remove statusmsg sigils from target
+ target = strings.TrimLeft(target, uc.availableStatusMsg)
+
if uc.network.equalCasemap(msg.Prefix.Name, serviceNick) {
uc.logger.Printf("skipping %v from soju's service: %v", msg.Command, msg)
break
@@ 973,6 978,12 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
} else {
uc.availableChannelTypes = stdChannelTypes
}
+ case "STATUSMSG":
+ if !negate {
+ uc.availableStatusMsg = value
+ } else {
+ uc.availableStatusMsg = ""
+ }
case "PREFIX":
if !negate {
err = uc.handleMemberships(value)