fix: fixed a bug which prevented 'set alias MAC ""' to clear an alias

This commit is contained in:
evilsocket 2019-03-20 13:36:44 +01:00
commit 4f54b12ee1
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -274,6 +274,9 @@ func (s *Session) shHandler(args []string, sess *Session) error {
func (s *Session) aliasHandler(args []string, sess *Session) error {
mac := args[0]
alias := str.Trim(args[1])
if alias == "\"\"" || alias == "''" {
alias = ""
}
s.Lan.SetAliasFor(mac, alias)
return nil
}