Store the channel-user modes of always-on clients along with their
channel memberships, restore them on server startup. This will coexist
alongside /CS AMODE, which autoapplies modes to clients on join regardless
of their always-on status.
This commit is contained in:
Shivaram Lingamneni 2020-12-02 03:56:00 -05:00
parent 3aeac42978
commit 51f279289d
4 changed files with 63 additions and 18 deletions

View file

@ -211,9 +211,9 @@ func (client *Client) SetAway(away bool, awayMessage string) (changed bool) {
}
func (client *Client) AlwaysOn() (alwaysOn bool) {
client.stateMutex.Lock()
client.stateMutex.RLock()
alwaysOn = client.registered && client.alwaysOn
client.stateMutex.Unlock()
client.stateMutex.RUnlock()
return
}