Made Chat into a levchk power as it was referenced that way several
authorRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 19:38:45 +0000 (15:38 -0400)
committerRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 19:38:45 +0000 (15:38 -0400)
places in the code.  Also Made it so you have to be Prived + Site power
in order to delete a power, as well as if you add a power you
automatically get the power.

src/division.c

index 297f43851143c0ffa80ed1119361ac9a167ce601..0bfbb70b7b5607876689e38e17eb82f286cb4cc5 100644 (file)
@@ -187,7 +187,7 @@ static struct new_division_power_entry_t new_power_list[] = {
   {"Builder", "self"},
   {"Can_NsPemit", "levchk"},
   {"Cemit", "self"},
-  {"Chat", "self"},
+  {"Chat", "levchk"},
   {"Chown", "levchk"},
   {"Combat", "levchk"},
   {"Cron", "self"},
@@ -1203,11 +1203,17 @@ COMMAND(cmd_power)
         power = add_power_type(arg_left, powc_list[i].name);
         notify_format(player, "Added power '%s' as a '%s' type power.",
                       power->name, powc_list[i].name);
+       /* Ok.. they added the power, they should get it themself.. At its max level */
+       RESET_POWER(player, power);
+       GIVE_DPBIT(player, power->flag_yes);
+       GIVE_DPBIT(player, power->flag_lte);
+       GIVE_DPBIT(player, power->flag_lt);
+
       } else
         notify(player, "Invalid Type.");
     } else
       notify(player, "No point adding a power that already exists.");
-  } else if (SW_ISSET(sw, SWITCH_DELETE) && Site(player)) {
+  } else if (SW_ISSET(sw, SWITCH_DELETE) && Site(player) && Prived(player)) {
     /* This should handle deleting both aliases & powers */
     if (arg_left && *arg_left) {
       power = (POWER *) ptab_find_exact(ps_tab.powers, arg_left);