mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-19 14:08:10 -07:00
+1
-1
@@ -111,7 +111,7 @@ func (channel *Channel) IsLoaded() bool {
|
||||
func (channel *Channel) resizeHistory(config *Config) {
|
||||
status, _ := channel.historyStatus(config)
|
||||
if status == HistoryEphemeral {
|
||||
channel.history.Resize(config.History.ChannelLength, config.History.AutoresizeWindow)
|
||||
channel.history.Resize(config.History.ChannelLength, time.Duration(config.History.AutoresizeWindow))
|
||||
} else {
|
||||
channel.history.Resize(0, 0)
|
||||
}
|
||||
|
||||
+2
-2
@@ -318,7 +318,7 @@ func (server *Server) RunClient(conn IRCConn) {
|
||||
proxiedIP: proxiedIP,
|
||||
}
|
||||
client.writerSemaphore.Initialize(1)
|
||||
client.history.Initialize(config.History.ClientLength, config.History.AutoresizeWindow)
|
||||
client.history.Initialize(config.History.ClientLength, time.Duration(config.History.AutoresizeWindow))
|
||||
client.brbTimer.Initialize(client)
|
||||
session := &Session{
|
||||
client: client,
|
||||
@@ -414,7 +414,7 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
||||
func (client *Client) resizeHistory(config *Config) {
|
||||
status, _ := client.historyStatus(config)
|
||||
if status == HistoryEphemeral {
|
||||
client.history.Resize(config.History.ClientLength, config.History.AutoresizeWindow)
|
||||
client.history.Resize(config.History.ClientLength, time.Duration(config.History.AutoresizeWindow))
|
||||
} else {
|
||||
client.history.Resize(0, 0)
|
||||
}
|
||||
|
||||
+6
-6
@@ -576,12 +576,12 @@ type Config struct {
|
||||
|
||||
History struct {
|
||||
Enabled bool
|
||||
ChannelLength int `yaml:"channel-length"`
|
||||
ClientLength int `yaml:"client-length"`
|
||||
AutoresizeWindow time.Duration `yaml:"autoresize-window"`
|
||||
AutoreplayOnJoin int `yaml:"autoreplay-on-join"`
|
||||
ChathistoryMax int `yaml:"chathistory-maxmessages"`
|
||||
ZNCMax int `yaml:"znc-maxmessages"`
|
||||
ChannelLength int `yaml:"channel-length"`
|
||||
ClientLength int `yaml:"client-length"`
|
||||
AutoresizeWindow custime.Duration `yaml:"autoresize-window"`
|
||||
AutoreplayOnJoin int `yaml:"autoreplay-on-join"`
|
||||
ChathistoryMax int `yaml:"chathistory-maxmessages"`
|
||||
ZNCMax int `yaml:"znc-maxmessages"`
|
||||
Restrictions struct {
|
||||
ExpireTime custime.Duration `yaml:"expire-time"`
|
||||
EnforceRegistrationDate bool `yaml:"enforce-registration-date"`
|
||||
|
||||
Reference in New Issue
Block a user