division quota hotfix - Nothing cuold be assigned to master division
authornveid <nveid@comcast.net>
Thu, 26 Oct 2006 00:10:46 +0000 (00:10 +0000)
committernveid <nveid@comcast.net>
Thu, 26 Oct 2006 00:10:46 +0000 (00:10 +0000)
appropriately as of a block on predicat.c, and the amoutn being allocated
into a division quota wasn't being calculated properely.

src/division.c
src/predicat.c

index 1dc8557db66e256627e47dc82702e55b74e3a797..088605888f179c75fa5d5e23372560e5326c61b8 100644 (file)
@@ -574,7 +574,7 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
   }
   for (pg_indx = 0; pg_indx < pg_cnt; reset = 0, pg_indx++) {
     p = p_buf[pg_indx];
-    if (*p == '!') {
+    if (*p == NOT_TOKEN) {
       reset++;
       p++;
     }
@@ -1523,7 +1523,9 @@ division_set(dbref exec, dbref target, const char *arg2)
 
   if(Typeof(target) == TYPE_PLAYER) {
     for(cnt = cur_obj = 0; cur_obj < db_top ; cur_obj++)
-      if(Owner(cur_obj) == target && Division(cur_obj) == Division(target))
+      if(!IsPlayer(cur_obj) && 
+          (Owner(cur_obj) == target) 
+          && (Division(cur_obj) == Division(target)))
         cnt++;
   } else cnt = 1;
 
index 7d749eddc385bb24843928bda40d8364a71c048e..24749d52d9a20c45a0e04648033ca5743d07af68 100644 (file)
@@ -679,10 +679,12 @@ pay_quota(dbref who, int cost)
   int curr;
 
   /* Check to make sure they can pass the division first */
-  curr = get_current_quota(Division(who));
+  if(GoodObject(Division(who))) { 
+    curr = get_current_quota(Division(who));
 
-  if(USE_QUOTA && !NoQuota(Division(who)) && (curr - cost < 0))
-    return 0;
+    if(USE_QUOTA && !NoQuota(Division(who)) && (curr - cost < 0))
+      return 0;
+  }
 
   /* some people don't need a quota */
   if (NoQuota(who))