1
0
Fork 0
forked from External/ergo

Merge pull request #1032 from slingamn/history_enable

fix #1030
This commit is contained in:
Shivaram Lingamneni 2020-05-20 04:33:35 -07:00 committed by GitHub
commit 5345fc35dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 21 deletions

View file

@ -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)
}