lsearch() didn't refund pennies
authorAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:28:56 +0000 (14:28 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:28:56 +0000 (14:28 +0000)
src/wiz.c

index 6a1f674ddbf2944af925f382139844d0af05df07..f0af0d430563030bfabd555fd44cf9fbdefcc776 100644 (file)
--- a/src/wiz.c
+++ b/src/wiz.c
@@ -1973,11 +1973,14 @@ raw_search(dbref player, const char *owner, int nargs, const char **args,
     return -1;
   }
 
-  if (fill_search_spec(player, owner, nargs, args, &spec) < 0)
+  if (fill_search_spec(player, owner, nargs, args, &spec) < 0) {
+    giveto(player, FIND_COST);
     return -1;
+  }
 
   if ((spec.owner != ANY_OWNER && spec.owner != player
       && !(CanSearch(player, spec.owner) || (spec.type == TYPE_PLAYER)))) {
+    giveto(player, FIND_COST);
     notify(player, T("You need a search warrant to do that."));
     return -1;
   }