mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
new: wifi.min.rssi, wifi.ap.ttl and wifi.sta.ttl changes are now applied in realtime
This commit is contained in:
parent
53b0d81f20
commit
12a11ef19d
5 changed files with 47 additions and 9 deletions
|
@ -87,11 +87,12 @@ func (env *Environment) WithCallback(name, value string, cb EnvironmentChangedCa
|
|||
|
||||
func (env *Environment) Set(name, value string) string {
|
||||
env.Lock()
|
||||
defer env.Unlock()
|
||||
|
||||
old := env.Data[name]
|
||||
env.Data[name] = value
|
||||
|
||||
env.Unlock()
|
||||
|
||||
if cb, hasCallback := env.cbs[name]; hasCallback {
|
||||
cb(value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue