|
@@ -39,6 +39,7 @@ type Limits struct {
|
39
|
39
|
MonitorEntries int
|
40
|
40
|
NickLen int
|
41
|
41
|
TopicLen int
|
|
42
|
+ ChanListModes int
|
42
|
43
|
}
|
43
|
44
|
|
44
|
45
|
// ListenerInterface represents an interface for a listener.
|
|
@@ -166,6 +167,7 @@ func NewServer(configFilename string, config *Config) *Server {
|
166
|
167
|
MonitorEntries: int(config.Limits.MonitorEntries),
|
167
|
168
|
NickLen: int(config.Limits.NickLen),
|
168
|
169
|
TopicLen: int(config.Limits.TopicLen),
|
|
170
|
+ ChanListModes: int(config.Limits.ChanListModes),
|
169
|
171
|
},
|
170
|
172
|
listeners: make(map[string]ListenerInterface),
|
171
|
173
|
monitoring: make(map[string][]Client),
|
|
@@ -266,7 +268,7 @@ func (server *Server) setISupport() {
|
266
|
268
|
server.isupport.Add("EXCEPTS", "")
|
267
|
269
|
server.isupport.Add("INVEX", "")
|
268
|
270
|
server.isupport.Add("KICKLEN", strconv.Itoa(server.limits.KickLen))
|
269
|
|
- // server.isupport.Add("MAXLIST", "") //TODO(dan): Support max list length?
|
|
271
|
+ server.isupport.Add("MAXLIST", fmt.Sprintf("beI:%s", strconv.Itoa(server.limits.ChanListModes)))
|
270
|
272
|
// server.isupport.Add("MODES", "") //TODO(dan): Support max modes?
|
271
|
273
|
server.isupport.Add("MONITOR", strconv.Itoa(server.limits.MonitorEntries))
|
272
|
274
|
server.isupport.Add("NETWORK", server.networkName)
|
|
@@ -1056,6 +1058,7 @@ func (server *Server) rehash() error {
|
1056
|
1058
|
MonitorEntries: int(config.Limits.MonitorEntries),
|
1057
|
1059
|
NickLen: int(config.Limits.NickLen),
|
1058
|
1060
|
TopicLen: int(config.Limits.TopicLen),
|
|
1061
|
+ ChanListModes: int(config.Limits.ChanListModes),
|
1059
|
1062
|
}
|
1060
|
1063
|
server.operclasses = *operclasses
|
1061
|
1064
|
server.operators = opers
|