View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000505 | LDMud 3.3 | Implementation | public | 2007-06-27 14:41 | 2018-01-29 21:57 |
| Reporter | zesstra | Assigned To | zesstra | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.3 | ||||
| Fixed in Version | 3.3.717 | ||||
| Summary | 0000505: tell_room() does not send to 'room' itself, only the contained objects | ||||
| Description | tell_room() sends the message only to objects contained in 'room', unlike say(), which sends the message also the environment itself, if suitable (interactive or living). Some wizard build containers/rooms/environments which are marked as living and define catch_tell(). In that cases, it would be very nice, if tell_room() and say() would have the same behaviour. | ||||
| Steps To Reproduce | Define catch_tell() in /room/room1.c and call enable_commands() in its create() and call tell_room("/room/room1","bla"). | ||||
| Additional Information | In object.c: e_say() adds the environment to the list of recipients, e_tell_room() does not. The attached patch for e_tell_room() adds 'room' to the list of recipients, if 'room' is interactive or marked as living. | ||||
| Tags | No tags attached. | ||||
| Attached Files | tell_room.patch (1,676 bytes)
--- ldmud-3.3.714.orig/src/object.c 2006-07-10 04:43:01.000000000 +0200
+++ ldmud-3.3.714/src/object.c 2007-06-27 22:37:36.000000000 +0200
@@ -4895,12 +4895,15 @@
{
object_t *ob;
object_t *save_command_giver;
- int num_recipients = 0;
+ // start with num_recipients==1 because the room/container itself is 1
+ // recipient, which is not counted in the for-loop (see below)
+ int num_recipients = 1;
object_t *some_recipients[20];
object_t **recipients;
object_t **curr_recipient;
char *message;
static svalue_t stmp = { T_OBJECT, } ;
+ interactive_t *ip;
/* Like in say(), collect the possible recipients.
* First count how many there are.
@@ -4908,8 +4911,6 @@
for (ob = room->contains; ob; ob = ob->next_inv)
{
- interactive_t *ip;
-
if ( ob->flags & O_ENABLE_COMMANDS
|| O_SET_INTERACTIVE(ip, ob))
{
@@ -4926,10 +4927,14 @@
/* Now fill the table */
curr_recipient = recipients;
+ /* The environment itself? */
+ if (room->flags & O_ENABLE_COMMANDS
+ || O_SET_INTERACTIVE(ip, room)) {
+ *curr_recipient++ = room;
+ }
+ // now the objects in the room/container
for (ob = room->contains; ob; ob = ob->next_inv)
{
- interactive_t *ip;
-
if ( ob->flags & O_ENABLE_COMMANDS
|| O_SET_INTERACTIVE(ip, ob))
{
@@ -4996,8 +5001,6 @@
for (curr_recipient = recipients; NULL != (ob = *curr_recipient++); )
{
- interactive_t *ip;
-
if (ob->flags & O_DESTRUCTED) continue;
stmp.u.ob = ob;
if (lookup_key(&stmp, avoid) >= 0) continue;
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-06-27 14:41 | zesstra | New Issue | |
| 2007-06-27 14:41 | zesstra | File Added: tell_room.patch | |
| 2008-06-30 02:58 | zesstra | Status | new => assigned |
| 2008-06-30 02:58 | zesstra | Assigned To | => zesstra |
| 2008-07-01 03:14 | Gnomi | Note Added: 0000641 | |
| 2008-07-16 13:56 | zesstra | Status | assigned => resolved |
| 2008-07-16 13:56 | zesstra | Fixed in Version | => 3.3.717 |
| 2008-07-16 13:56 | zesstra | Resolution | open => fixed |
| 2008-07-16 13:56 | zesstra | Note Added: 0000729 | |
| 2010-11-16 09:42 | zesstra | Source_changeset_attached | => ldmud.git master 493cccf3 |
| 2018-01-29 18:59 | zesstra | Source_changeset_attached | => ldmud.git master 493cccf3 |
| 2018-01-29 21:57 | zesstra | Source_changeset_attached | => ldmud.git master 493cccf3 |