mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
WHOWAS: Make maximum number of entries configurable
This commit is contained in:
parent
6e66c5c8a7
commit
43553390d6
@ -27,9 +27,10 @@ Initial release of Oragono!
|
||||
* Changed private (`+p`) channel mode to secret (`+s`), to match what's used by servers today.
|
||||
* Changed default channel modes to (`+nt`), matching most other IRCds.
|
||||
* Changed CLI commands and arguments to be more consistent with typical software.
|
||||
* Changed maximum nickname and channel name lengths to be configurable.
|
||||
* Changed usernames set by the `USER` command to start with `"~"` (to work with new ident support).
|
||||
* Renamed `ONICK` command to `SANICK` to be more consistent with other IRCds.
|
||||
* Made maximum nickname and channel name lengths configurable.
|
||||
* Made maximum `WHOWAS` entries configurable.
|
||||
|
||||
### Removed
|
||||
* Removed gitconfig configuration format [replaced with YAML].
|
||||
|
@ -68,8 +68,9 @@ type Config struct {
|
||||
Theater map[string]*PassConfig
|
||||
|
||||
Limits struct {
|
||||
NickLen int `yaml:"nicklen"`
|
||||
ChannelLen int `yaml:"channellen"`
|
||||
NickLen int `yaml:"nicklen"`
|
||||
ChannelLen int `yaml:"channellen"`
|
||||
WhowasEntries uint `yaml:"whowas-entries"`
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ func NewServer(config *Config) *Server {
|
||||
operators: config.Operators(),
|
||||
signals: make(chan os.Signal, len(SERVER_SIGNALS)),
|
||||
proxyAllowedFrom: config.Server.ProxyAllowedFrom,
|
||||
whoWas: NewWhoWasList(100),
|
||||
whoWas: NewWhoWasList(config.Limits.WhowasEntries),
|
||||
theaters: config.Theaters(),
|
||||
checkIdent: config.Server.CheckIdent,
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ type WhoWas struct {
|
||||
|
||||
func NewWhoWasList(size uint) *WhoWasList {
|
||||
return &WhoWasList{
|
||||
buffer: make([]*WhoWas, size),
|
||||
buffer: make([]*WhoWas, size+1),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,3 +64,6 @@ limits:
|
||||
|
||||
# channellen is the max channel length allowed
|
||||
channellen: 64
|
||||
|
||||
# whowas entries to store
|
||||
whowas-entries: 100
|
||||
|
Loading…
Reference in New Issue
Block a user