mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-07 16:34:20 +01:00
Added zone checks for load and purge for Imms
This commit is contained in:
parent
8f586bdd2a
commit
2914b2d474
2 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue