[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Running the server
. . -> [Subject]  help with a new command
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

help with a new command

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Tidus   (11 posts)  [Biography] bio
Date Tue 27 Apr 2004 04:04 PM (UTC)
I have put in a plist command which is a variation of a snippet I found not too long ago. It displays everyone in the player directory and it used to also display thier warpoints next to thier name but one day it started only displaying my own warpoints next to everyone else's name. I am not sure what is wrong with it. I have attached a copy of the function here, if anyone could please help me that would be great.

void do_plist( CHAR_DATA *ch, char *argument )
DIR *dp;
struct dirent *ep;
char buf[80];
char buffer[MAX_STRING_LENGTH*4];
bool is_playing = FALSE;
bool ploaded = FALSE;
CHAR_DATA *victim;

dp = opendir ("../player");

if (dp != NULL)

while ( (ep = readdir (dp)))
if ( ep->d_name[0] == '.' )

for(victim = char_list;victim != NULL;victim = victim->next)

if(is_name(victim->name, ep->d_name))


if ( victim == NULL )
victim = pload(ep->d_name);
ploaded = TRUE;
is_playing = FALSE;
is_playing = TRUE;
ploaded = FALSE;

sprintf( buf, "%-15s %4d\n\r",
ep->d_name, victim->warpoints);
strcat( buffer, buf );


closedir (dp);

perror ("Couldn't open the directory");

page_to_char( buffer, ch );


[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]