Hey list, i've been slaving away at this for days.  everything for a character 
that is offline works fine, but 
when i go to finger an online character, regardless of the name i put in, it 
shows me as the person i am fingering. 
(Ie, if i type finger kaltak, while on as atm , it shows atm instead of Kaltak) 
 and when a new character logs on, it shows them instead of the argument (kinda 
seems its only showing the newest char to log on the mud)  Any help would be 
appreciated :-D

Atm


/* 
 * Tyric 6/6/97 This function requires that the char passed in to the 
 * function is not logged in.  If the char is, return a message that 
 * the char is on.  Otherwise, show date and time last logged on, and
 * also if the char using finger is immortal, show the site logged in from.
 */
void do_finger(CHAR_DATA *ch, char *argument)
{
    FILE *fp;
    char arg[MAX_INPUT_LENGTH];
    char strsave[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];
    char *name;
    DESCRIPTOR_DATA *d;
    bool found = FALSE;
    char letter;
    char *word;

    one_argument(argument,arg);

    if (arg[0] == '\0')
    {
        send_to_char("You must provide a name.\n\r",ch);
        return;
    }
    name = arg;
/* Tyric 7/22/97 Fixed Socket recycling bug */
    for (d = descriptor_list; d; d = d->next)
    {
        CHAR_DATA *wch;

        if (d->connected != CON_PLAYING || !can_see(ch,d->character))
            continue;

        wch = ( d->original != NULL ) ? d->original : d->character;
    
    if ( !can_see(ch,wch) )
       continue;

        if (!str_prefix(arg,wch->name))
            found = TRUE;
    }

    if (found)
    {
         for (d = descriptor_list; d; d = d->next)
    {
        CHAR_DATA *wch;

        if (d->connected != CON_PLAYING || !can_see(ch,d->character))
            continue;

        wch = ( d->original != NULL ) ? d->original : d->character;
    
    if ( !can_see(ch,wch) )
       continue;

        if (!str_prefix(arg,wch->name))
            found = TRUE;
    if(is_clan(wch))
    {
    sprintf(buf,"{R<{r<{xName{r>{R>{x: {G%16s{x\n\r{G|{g<{xClan{g>{G|{x:  
%16s{x\n\r{B<{x|{CLevel{x|{B>: {x%14d{x\n\r", wch->name, 
       clan_table[wch->clan].who_name,wch->level);
    send_to_char(buf, ch);
    }
    if(!is_clan(wch))
    {
    sprintf(buf,"{R<{r<{xName{r>{R>{x: {G%16s{x\n\r{B<{x|{CLevel{x|{B>: 
{x%15d{x\n\r", wch->name,
        wch->level);
    send_to_char(buf, ch);
    }
    sprintf(buf, "{R<{x|{GClass{x|{R>{x: %16s\n\r", 
class_table[wch->class].name);
    send_to_char(buf, ch);
    if(wch->desc != NULL)
    sprintf(buf, "%s is currently playing {RF{ro{Rr{rg{Ro{rt{Rt{re{Rn 
{DE{xm{Dp{xi{Dr{xe{D.{x\n\r", wch->name);
    else
    sprintf(buf, "%s is currently linkdead.\n\r", wch->name);
    send_to_char(buf, ch);
    return;
         }    
    }
    else
    /* begin real finger stuff */

everything from here works like it should :)

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Reply via email to