[CODE] Bug in drunk code

From: Brian Christopher Guilbault (guil9964@nova.gmi.edu)
Date: 10/14/96

Hi Guys-

This is mostly for Alex so that he can update it on the snippets page, 
but also for everyone who may be using Haddixx's drunk code from the ftp 
sites of the snippets page. I was having a weird problem with the "reply" 
command. It seemed that when a characer replied to another it would send 
a random buffer from somewhere else. Sometimes it would send spell 
messages, sometimes the who list, etc. This is the code that is in the 
patch on the web site:

in do_reply:

     if (tch == NULL)
       send_to_char("They are no longer playing.\r\n", ch);
+    {
+      argument = makedrunk(buf2, ch);
+      perform_tell(ch, tch, argument);
+    }

I changed the line I marked to:

       argument = makedrunk(argument, ch);

and the probelem disappeared. It seems that it was passing buf2 to the 
makedrunk function, but buf2 has nothing to do with the reply, you want 
to use argument. Hope that helps everyone out a bit.


Brian Guilbault - GMI Engineering Institute
E-mail: guil9964@gmi.edu, dante@i-55.com
WWW: http://apollo.gmi.edu/~guil9964
QuarantineMUD: Telnet to exit1.i-55.com 4000

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

This archive was generated by hypermail 2b30 : 12/18/00 PST