new: aliases are now persistant

This commit is contained in:
evilsocket 2018-01-28 21:07:21 +01:00
commit e216cdde48
3 changed files with 74 additions and 4 deletions

View file

@ -183,8 +183,7 @@ func (s *Session) aliasHandler(args []string, sess *Session) error {
mac := args[0]
alias := args[1]
if t, found := s.Targets.Targets[mac]; found == true {
t.Alias = alias
if s.Targets.SetAliasFor(mac, alias) == true {
return nil
} else {
return fmt.Errorf("Could not find endpoint %s", mac)