refact: the env.change event is now just a debug log

This commit is contained in:
evilsocket 2018-02-01 14:12:26 +01:00
commit 4756b885ec

View file

@ -5,6 +5,8 @@ import (
"sort"
"strconv"
"sync"
"github.com/evilsocket/bettercap-ng/core"
)
type Environment struct {
@ -41,13 +43,7 @@ func (env *Environment) Set(name, value string) string {
old, _ := env.Storage[name]
env.Storage[name] = value
env.sess.Events.Add("env.change", struct {
Name string
Value string
}{
name,
value,
})
env.sess.Events.Log(core.DEBUG, "env.change: %s -> '%s'", name, value)
width := len(name)
if width > env.Padding {