mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #328 (implement DEFCON)
This commit is contained in:
parent
f2d0842453
commit
6ea2eb367d
11 changed files with 70 additions and 7 deletions
|
|
@ -37,6 +37,14 @@ func (server *Server) Languages() (lm *languages.Manager) {
|
|||
return server.Config().languageManager
|
||||
}
|
||||
|
||||
func (server *Server) Defcon() uint32 {
|
||||
return atomic.LoadUint32(&server.defcon)
|
||||
}
|
||||
|
||||
func (server *Server) SetDefcon(defcon uint32) {
|
||||
atomic.StoreUint32(&server.defcon, defcon)
|
||||
}
|
||||
|
||||
func (client *Client) Sessions() (sessions []*Session) {
|
||||
client.stateMutex.RLock()
|
||||
sessions = client.sessions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue