|
@@ -42,6 +42,10 @@ var (
|
42
|
42
|
// whitelist of caps to serve on the STS-only listener. In particular,
|
43
|
43
|
// never advertise SASL, to discourage people from sending their passwords:
|
44
|
44
|
stsOnlyCaps = caps.NewSet(caps.STS, caps.MessageTags, caps.ServerTime, caps.LabeledResponse, caps.Nope)
|
|
45
|
+
|
|
46
|
+ // we only have standard channels for now. TODO: any updates to this
|
|
47
|
+ // will also need to be reflected in CasefoldChannel
|
|
48
|
+ chanTypes = "#"
|
45
|
49
|
)
|
46
|
50
|
|
47
|
51
|
// ListenerWrapper wraps a listener so it can be safely reconfigured or stopped
|
|
@@ -137,13 +141,13 @@ func (config *Config) generateISupport() (err error) {
|
137
|
141
|
isupport.Initialize()
|
138
|
142
|
isupport.Add("AWAYLEN", strconv.Itoa(config.Limits.AwayLen))
|
139
|
143
|
isupport.Add("CASEMAPPING", "ascii")
|
140
|
|
- isupport.Add("CHANLIMIT", fmt.Sprintf("#:%d", config.Channels.MaxChannelsPerClient))
|
|
144
|
+ isupport.Add("CHANLIMIT", fmt.Sprintf("%s:%d", chanTypes, config.Channels.MaxChannelsPerClient))
|
141
|
145
|
isupport.Add("CHANMODES", strings.Join([]string{modes.Modes{modes.BanMask, modes.ExceptMask, modes.InviteMask}.String(), "", modes.Modes{modes.UserLimit, modes.Key}.String(), modes.Modes{modes.InviteOnly, modes.Moderated, modes.NoOutside, modes.OpOnlyTopic, modes.ChanRoleplaying, modes.Secret}.String()}, ","))
|
142
|
146
|
if config.History.Enabled && config.History.ChathistoryMax > 0 {
|
143
|
147
|
isupport.Add("draft/CHATHISTORY", strconv.Itoa(config.History.ChathistoryMax))
|
144
|
148
|
}
|
145
|
149
|
isupport.Add("CHANNELLEN", strconv.Itoa(config.Limits.ChannelLen))
|
146
|
|
- isupport.Add("CHANTYPES", "#")
|
|
150
|
+ isupport.Add("CHANTYPES", chanTypes)
|
147
|
151
|
isupport.Add("ELIST", "U")
|
148
|
152
|
isupport.Add("EXCEPTS", "")
|
149
|
153
|
isupport.Add("INVEX", "")
|