mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-29 18:28:10 -07:00
remove draft/resume-0.5
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user