Persist realname for always-on clients

This commit is contained in:
Conrad Lukawski 2020-07-06 04:08:04 -04:00
parent 7d596add87
commit 6f8711da3b
5 changed files with 51 additions and 10 deletions

View file

@ -373,7 +373,11 @@ func (client *Client) SetMode(mode modes.Mode, on bool) bool {
func (client *Client) SetRealname(realname string) {
client.stateMutex.Lock()
client.realname = realname
alwaysOn := client.alwaysOn
client.stateMutex.Unlock()
if alwaysOn {
client.markDirty(IncludeRealname)
}
}
func (client *Client) Channels() (result []*Channel) {