Eavesdrop Snippet Bug

  • Papaya Pete
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
5 years 10 months ago #2919 by Papaya Pete
Eavesdrop Snippet Bug was created by Papaya Pete
So while working on building, I decided to take a look at the send_to_room function... and found out why I was having issues with getting (NULL). The eavesdrop snippet changes send_to_room in a way that renders it unable to use variables!

So, if you've put in the eavesdrop snippet, here is the fix for that bug. Open up comm.c, and the send_to_room function should look like this...
void send_to_room(room_rnum room, const char *messg, ...)
  struct char_data *i;
  char buf[MAX_STRING_LENGTH];
  va_list args;

  if (messg) {
    for (i = world[room].people; i; i = i->next_in_room) {
      if (!i->desc)

    va_start(args, messg);
    vwrite_to_output(i->desc, messg, args);
    for (i = world[room].listening; i; i = i->next_listener)
      if (i->desc) {
/*  the ------'s are used to differentiate eavesdropped stuff from
 *  the stuff that is happening in the same room as the char..
 *  looks like:
 *  -------
 *  john dropped a sword
 *  ------
        sprintf(buf, "----------\r\n%s----------\r\n", messg);
        write_to_output(i->desc, buf);

Sorry about not catching that, and I have to apologize to Cygwin for blaming it for what is clearly my mistake. :P

Hope this helps.

Please Log in or Create an account to join the conversation.

Time to create page: 0.973 seconds