{
/* give a message to the "absolute" location of an object */
dbref room;
- int rec = 0;
int na_flags = NA_INTER_HEAR;
int silent = (flags & PEMIT_SILENT) ? 1 : 0;
if (!Mobile(player))
return;
- /* prevent infinite loop if player is inside himself */
- if (((room = Location(player)) == player) || !GoodObject(room)) {
- notify(player, T("Invalid container object."));
- do_rawlog(LT_ERR, T("** BAD CONTAINER ** #%d is inside #%d."), player,
- room);
- return;
- }
- while (!IsRoom(room) && (rec < 15)) {
- room = Location(room);
- rec++;
- }
- if (rec > 15) {
+ room = absolute_room(player);
+ if (!GoodObject(room) || !IsRoom(room)) {
notify(player, T("Too many containers."));
return;
- } else if (!CanSpeak(player, room)) {
- notify(player, T("You may not speak there!"));
+ } else if(!CanSpeak(player, room)) {
+ fail_lock(player, room, Speech_Lock, T("You may not speak there!"),
+ NOTHING);
+ return;
} else {
if (!silent && (Location(player) != room))
notify_format(player, T("You lemit: \"%s\""), tbuf1);
}
}
+
+
/** notify_anything() function for zone emits.
* \param current unused.
* \param data array of notify data.