mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-24 08:08:11 -07:00
Set default user modes when always-on clients reconnect.
Add default-user-modes configuration to conventional.yaml. Fix comment on DefaultUserModes.
This commit is contained in:
committed by
Alex Jaspersen
parent
52910a185c
commit
b3a7e5c996
@@ -375,6 +375,10 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
||||
alwaysOn: true,
|
||||
}
|
||||
|
||||
for _, defaultMode := range config.Accounts.defaultUserModes {
|
||||
client.SetMode(defaultMode, true)
|
||||
}
|
||||
|
||||
client.SetMode(modes.TLS, true)
|
||||
client.writerSemaphore.Initialize(1)
|
||||
client.history.Initialize(0, 0)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ var (
|
||||
}
|
||||
|
||||
// DefaultUserModes are set on all users when they login.
|
||||
// this can be overridden in the `server` config, with the `default-user-modes` key
|
||||
// this can be overridden in the `accounts` config, with the `default-user-modes` key
|
||||
DefaultUserModes = modes.Modes{}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user