Description: This is the ooc channel, Out of Character chat.  You do this the same way to add any other channels, but just change the ooc to the name of your new channel.
-----------
Install:
Step 1.  Add in the following codes:
*----------*
|act_comm.c|
*----------*
This is where the actual channel is put.  The only changes you need to make are to put in the OOC in the channels command and add in the function OOC.

First, find this portion of code:


    send_to_char("gossip         ",ch);
    if (!IS_SET(ch->comm,COMM_NOGOSSIP))
      send_to_char("ON\n\r",ch);
    else
      send_to_char("OFF\n\r",ch);

Right below it add in this:


    send_to_char("ooc           ",ch);
    if (!IS_SET(ch->comm,COMM_NOOOC))
      send_to_char("ON\n\r",ch);
    else
      send_to_char("OFF\n\r",ch);

Next, scroll down untill you find the gossip function and right below it (between gossip and grats) add this.

void do_ooc( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    DESCRIPTOR_DATA *d;

    if (argument[0] == '\0' )
    {
      if (IS_SET(ch->comm,COMM_NOOOC))
      {
        send_to_char("OOC channel is now ON.\n\r",ch);
 REMOVE_BIT(ch->comm,COMM_NOOOC);
      }
      else
      {
        send_to_char("OOC channel is now OFF.\n\r",ch);
        SET_BIT(ch->comm,COMM_NOOOC);
      }
    }
    else  /* ooc message sent, turn ooc on if it isn't already */
    {
        if (IS_SET(ch->comm,COMM_QUIET))
        {
          send_to_char("You must turn off quiet mode first.\n\r",ch);
          return;
        }

        if (IS_SET(ch->comm,COMM_NOCHANNELS))
{
          send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
          return;

        }

      REMOVE_BIT(ch->comm,COMM_NOOOC);

      sprintf( buf, "You ooc '%s'\n\r{x", argument );
      send_to_char( buf, ch );
      for ( d = descriptor_list; d != NULL; d = d->next )
      {
        CHAR_DATA *victim;

        victim = d->original ? d->original : d->character;

        if ( d->connected == CON_PLAYING &&
	 d->character != ch &&
             !IS_SET(victim->comm,COMM_NOOOC) &&
             !IS_SET(victim->comm,COMM_QUIET) )
        {
          act_new( "$n oocs '$t'",
                   ch,argument, d->character, TO_VICT,POS_SLEEPING );
        }
      }
    }
}

*---------*
|handler.c|
*---------*

Find this line:
    if (comm_flags & COMM_NOGOSSIP      ) strcat(buf, " no_gossip");

Below it, put in this:
    if (comm_flags & COMM_NOOOC         ) strcat(buf, " no_ooc");

*--------*
|tables.c|
*--------*

Find this line:
    {   "nogossip",             COMM_NOGOSSIP,          TRUE    },

Below it, put in this:
    {   "noooc",                COMM_NOOOC,             TRUE    },
*--------*
|interp.c|
*--------*

Find this line:
{ "gossip",         do_gossip,      POS_SLEEPING,    0,  LOG_NORMAL,1},

Below it, add this:
{ "]",              do_ooc,         POS_SLEEPING,    0,  LOG_NORMAL,0},
{ "ooc",            do_ooc,         POS_SLEEPING,    0,  LOG_NORMAL,1},
*--------*
|interp.h|
*--------*

Add this at the bottom:
DECLARE_DO_FUN( do_ooc          );

*------*
|merc.h|
*------*

Find this line:

#define COMM_NOGOSSIP           (E)

Below it, find an empty bit.  With stock Rom the bit (S) is unused for example, you can stick it somewhere else if you want but I like to keep my channel stuff as close together as I can.  If you do use the (S) bit, it should look like this:

#define COMM_NOOOC              (S)

-----
Step 2. Remove your .o files.
Step 3. Do a make.
Step 4. Reboot your mud.
Step 5. Enjoy your new ooc channel.


Well that's it.  No need to give me credit for this, I didn't really code anything, just changed what is there.  You may want the add in colo(u)rs to it if you have a colo(u)r code.  If you find anything wrong with this, tell me about it!  My e-mail is below.

-Calan
 plexygold@hotmail.com
