forked from External/ergo
Merge branch 'realname_again'
This commit is contained in:
commit
a99c893f9b
5 changed files with 59 additions and 9 deletions
|
|
@ -364,7 +364,7 @@ func (server *Server) RunClient(conn IRCConn) {
|
|||
client.run(session)
|
||||
}
|
||||
|
||||
func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen map[string]time.Time, uModes modes.Modes) {
|
||||
func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen map[string]time.Time, uModes modes.Modes, realname string) {
|
||||
now := time.Now().UTC()
|
||||
config := server.Config()
|
||||
if lastSeen == nil && account.Settings.AutoreplayMissed {
|
||||
|
|
@ -385,6 +385,7 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
|||
realIP: utils.IPv4LoopbackAddress,
|
||||
|
||||
alwaysOn: true,
|
||||
realname: realname,
|
||||
}
|
||||
|
||||
client.SetMode(modes.TLS, true)
|
||||
|
|
@ -1706,6 +1707,7 @@ const (
|
|||
IncludeChannels uint = 1 << iota
|
||||
IncludeLastSeen
|
||||
IncludeUserModes
|
||||
IncludeRealname
|
||||
)
|
||||
|
||||
func (client *Client) markDirty(dirtyBits uint) {
|
||||
|
|
@ -1777,6 +1779,9 @@ func (client *Client) performWrite(additionalDirtyBits uint) {
|
|||
}
|
||||
client.server.accounts.saveModes(account, uModes)
|
||||
}
|
||||
if (dirtyBits & IncludeRealname) != 0 {
|
||||
client.server.accounts.saveRealname(account, client.realname)
|
||||
}
|
||||
}
|
||||
|
||||
// Blocking store; see Channel.Store and Socket.BlockingWrite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue