Re: [Code] do_set - name changing and log output.

From: Jeremy M. (jkm4802@hotmail.com)
Date: 12/12/02


Jeremy M. wrote:
Hey all,
I'm trying to get a mudlog/syslog message to work, however I'm not
absolutely sure what it entails or what I should do. Here's what I
would "like" to do to the do_set function I'm working on.


Paolo Wrote:
Well it seems that your naming policies are a little too lax for
circlemud (well, at least for bpl14). I've released a snippet that
does almost all the dirty work, it was used in my (now defunct) mud for
manned naming authorization procedure.

But that's not the point =)
I think that you should study sprintf a little more...

-----+ Snip +------

Actually I pretty much know sprintf backwards, forwards, sideways, up and
down, and inside out. The code wasn't done by me originally and the mud
source isn't my own.  I'm helping out a relative whom also runs a MUD
project, she lost both her coders and it pretty much screwed her royally so
soon to the second opening of a newer version of her very old mud. My
original question stands, is there a more efficient and less time consuming
way to display the old name, new name and actor's name in a syslog string?

sprintf(logbuf, "(GC) %s has changed %s's name to ....", GET_NAME(ch),
GET_NAME(vict));
/* GET_NAME(vict) should probably be GET_OLDNAME(vict) */

sprintf(logbuf, "(GC) %s has changed the name of %s to %s.",
GET_NAME(ch),GET_OLDNAME(vict), GET_NAME(vict));

Jeremy M.


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT