mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
remove draft/resume-0.5
This commit is contained in:
parent
df49137aca
commit
ba21987d03
14 changed files with 4 additions and 683 deletions
|
|
@ -54,18 +54,6 @@ func (client *Client) Sessions() (sessions []*Session) {
|
|||
return
|
||||
}
|
||||
|
||||
func (client *Client) GetSessionByResumeID(resumeID string) (result *Session) {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
||||
for _, session := range client.sessions {
|
||||
if session.resumeID == resumeID {
|
||||
return session
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type SessionData struct {
|
||||
ctime time.Time
|
||||
atime time.Time
|
||||
|
|
@ -157,12 +145,6 @@ func (client *Client) removeSession(session *Session) (success bool, length int)
|
|||
return
|
||||
}
|
||||
|
||||
func (session *Session) SetResumeID(resumeID string) {
|
||||
session.client.stateMutex.Lock()
|
||||
session.resumeID = resumeID
|
||||
session.client.stateMutex.Unlock()
|
||||
}
|
||||
|
||||
func (client *Client) Nick() string {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
|
@ -265,18 +247,6 @@ func (client *Client) uniqueIdentifiers() (nickCasefolded string, skeleton strin
|
|||
return client.nickCasefolded, client.skeleton
|
||||
}
|
||||
|
||||
func (client *Client) ResumeID() string {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
return client.resumeID
|
||||
}
|
||||
|
||||
func (client *Client) SetResumeID(id string) {
|
||||
client.stateMutex.Lock()
|
||||
defer client.stateMutex.Unlock()
|
||||
client.resumeID = id
|
||||
}
|
||||
|
||||
func (client *Client) Oper() *Oper {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue