diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index 9db74cebe8..6605f6a0cf 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -2768,7 +2768,7 @@ class CmdFind(COMMAND_DEFAULT_CLASS): caller = self.caller switches = self.switches - if not self.args: + if not self.args or (not self.lhs and not self.rhs): caller.msg("Usage: find [= low [-high]]") return diff --git a/evennia/commands/default/tests.py b/evennia/commands/default/tests.py index d2373adf2f..333e1e12fc 100644 --- a/evennia/commands/default/tests.py +++ b/evennia/commands/default/tests.py @@ -1215,6 +1215,9 @@ class TestBuilding(CommandTest): self.call(building.CmdFind(), "/exit Obj") self.call(building.CmdFind(), "/exact Obj", "One Match") + # Test null search + self.call(building.CmdFind(), "=", "Usage: ") + # Test bogus dbref range with no search term self.call(building.CmdFind(), "= obj", "Invalid dbref range provided (not a number).") self.call(building.CmdFind(), "= #1a", "Invalid dbref range provided (not a number).")