The problem is that you are stripping off 2, one word arguments from the
"argument" variable that is passed to do_clan.

    argument = one_argument(argument, arg1);
    argument = one_argument(argument, arg2);

The first one is doing what you want I think.  It is removing "talk" off
the front of the string and storing it in arg1, returning the remainder
to argument.  The next like does the same thing, cept with arg2.  So,
for example, if someone typed "clan talk Heya Clannies!",

Arg1 == talk
Arg2 = Hey

Below, after you check to make sure that arg1 == talk you do this:

sprintf( buf, "{B[{W%s{B]{x clans {R'{x%s{R'{x\n\r",
                        ch->name,
                        arg2 );

But, arg2 == "Hey", and argument contains "clannies!"  I don't know what
the intention of arg2 is, but if you remove arg2, and just use argument
in its place below, you should be ok.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, December 13, 2002 5:27 PM
To: [email protected]
Subject: [Noob] Clan talk only shows first word. [?]

doing Clan talk "string here"  would only show the first word.  Any
tips?  

/*
* Function: Clan
* Desc    : A function wrapper for misc Clan commands
* Syntax  : clan who
            clan list
            clan talk <message>
* Written : v1.0 3/25/01
* Author  : Xanth Nomeda <xnomeda#nomeda,com>
*/
void do_clan(CHAR_DATA * ch, char *argument)
{
    char arg1[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH];
    char buf[MAX_INPUT_LENGTH];
    DESCRIPTOR_DATA *d;
    int clan;

    argument = one_argument(argument, arg1);
    argument = one_argument(argument, arg2);

    if (arg1[0] == '\0')
    {
        send_to_char("Syntax:   clan [talk] <messgae>\n\r", ch);
        //send_to_char("            clan [who]\n\r", ch);
        send_to_char("          clan [list]\n\r", ch);
        return;
    }

/*  hack of clantalk */
    if (!str_prefix(arg1, "talk"))
    {
        if (!is_clan(ch)
            || IS_SET(clan_table[ch->clan].flags,GUILD_INDEPENDENT))
        {
         send_to_char("You aren't in a clan.\n\r",ch);
            return;
        }

        if (arg2[0] == '\0')
        {
        send_to_char("What would you like to clan?\n\r", ch);
            return;
        }

    sprintf( buf, "{B[{W%s{B]{x clans {R'{x%s{R'{x\n\r",
                        ch->name,
                        arg2 );

        for ( d = descriptor_list; d != NULL; d = d->next )
        {
            if ( d->connected == CON_PLAYING
                && is_same_clan(ch,d->character)
                && !IS_SET(d->character->comm,COMM_NOCLAN)
                && !IS_SET(d->character->comm,COMM_QUIET) )
            {
                send_to_char(buf, d->character);
            }
        }

        return;
    }

Any help would be appreciated  
Thanks List
Charlie
the noobz

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to