Added zone checks for load and purge for Imms

This commit is contained in:
JamDog 2010-12-02 01:03:21 +00:00
parent 8f586bdd2a
commit 2914b2d474
2 changed files with 15 additions and 0 deletions

View file

@ -37,6 +37,7 @@ Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
@
[Dec 01 2010] - Jamdog
Fixed do_cheat so that only ID 1 can get a full restoration
Added zone checks for load/purge commands below admin level 3 (GrGod)
[Nov 30 2010] - Jamdog
Bug-Fix: Fixed incorrect rnum showing on stat room <vnum> (Thanks Kam)
Added hsedit House Editor OLC

View file

@ -1367,6 +1367,11 @@ ACMD(do_load)
struct char_data *mob=NULL;
mob_rnum r_num;
if (!IS_ADMIN(ch, ADMLVL_GRGOD) && !can_edit_zone(ch, world[IN_ROOM(ch)].zone)) {
send_to_char(ch, "Sorry, you can't load mobs here.\r\n");
return;
}
if ((r_num = real_mobile(atoi(buf2))) == NOBODY) {
send_to_char(ch, "There is no monster with that number.\r\n");
return;
@ -1384,6 +1389,11 @@ ACMD(do_load)
struct obj_data *obj;
obj_rnum r_num;
if (!IS_ADMIN(ch, ADMLVL_GRGOD) && !can_edit_zone(ch, world[IN_ROOM(ch)].zone)) {
send_to_char(ch, "Sorry, you can't load objects here.\r\n");
return;
}
if ((r_num = real_object(atoi(buf2))) == NOTHING) {
send_to_char(ch, "There is no object with that number.\r\n");
return;
@ -1476,6 +1486,10 @@ ACMD(do_purge)
one_argument(argument, buf);
if (!IS_ADMIN(ch, ADMLVL_GRGOD) && !can_edit_zone(ch, world[IN_ROOM(ch)].zone)) {
send_to_char(ch, "Sorry, you can't purge anything here.\r\n");
return;
}
/* argument supplied. destroy single object or char */
if (*buf) {
t = buf;