forked from External/ergo
Very initial maxline work
This commit is contained in:
parent
a0c97542ee
commit
d2e18962e3
7 changed files with 50 additions and 11 deletions
|
|
@ -151,14 +151,15 @@ type Config struct {
|
|||
Opers map[string]*OperConfig
|
||||
|
||||
Limits struct {
|
||||
NickLen uint `yaml:"nicklen"`
|
||||
ChannelLen uint `yaml:"channellen"`
|
||||
AwayLen uint `yaml:"awaylen"`
|
||||
ChanListModes uint `yaml:"chan-list-modes"`
|
||||
ChannelLen uint `yaml:"channellen"`
|
||||
KickLen uint `yaml:"kicklen"`
|
||||
LineLen uint `yaml:"linelen"`
|
||||
MonitorEntries uint `yaml:"monitor-entries"`
|
||||
NickLen uint `yaml:"nicklen"`
|
||||
TopicLen uint `yaml:"topiclen"`
|
||||
WhowasEntries uint `yaml:"whowas-entries"`
|
||||
MonitorEntries uint `yaml:"monitor-entries"`
|
||||
ChanListModes uint `yaml:"chan-list-modes"`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -335,6 +336,9 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
return nil, fmt.Errorf("Could not parse connection-throttle ban-duration: %s", err.Error())
|
||||
}
|
||||
}
|
||||
if config.Limits.LineLen < 512 {
|
||||
return nil, errors.New("Line length must be 512 or greater")
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue