This snippet allows for you to add an OOC channel. 
It's almost identical to the 'say' command but 
you can turn it off and on. If you turn quiet mode on,
it turns it off, as well as NO_CHANNELS

You can if you want, but you don't have to give me any Credit. :)
I hope you enjoy the code.

First of all this code uses Lope's color codes.
If you don't have that, just take out all of the colors.

THE SNIPPET
======================================================================

Open up 'interp.c'. Go down to the Communication commands:
The line with the * is the line I've added. Add that line
in your code.

/*  { "music",		do_music,	POS_SLEEPING,	 0,  LOG_NORMAL, 1 }, */
    { "note",		do_note,	POS_SLEEPING,	 0,  LOG_NORMAL, 1 },
 *  { "ooc",        do_ooc,     POS_RESTING,     0,  LOG_NORMAL, 1 },
    { "pose",		do_pose,	POS_RESTING,	 0,  LOG_NORMAL, 1 },
    
Next, Open up 'act_comm.c'. Go down to where has the information
about the channels:
Again. Add the lines with the Stars(*).

     send_to_char("tells          ",ch);
    if (!IS_SET(ch->comm,COMM_DEAF))
	send_to_char("{GON{x\n\r",ch);
    else
	send_to_char("{bOFF{x\n\r",ch);

*    send_to_char("OOC            ",ch);
*    if (!IS_SET(ch->comm,COMM_OOCOFF))
*	send_to_char("{GON{x\n\r",ch);
*    else
*	send_to_char("{bOFF{x\n\r",ch)

Do a search(ctrl+f) for the 'do_say' function. Go to the end 
of this function and add this:

void do_ooc( CHAR_DATA *ch, char *argument )
{

     DESCRIPTOR_DATA *d;
      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 {Rgods{x have revoked your channel priviliges.\n\r",ch);
          return; 
       	} 
     
    if (argument[0] == '\0' )
    {
      	
       if (IS_SET(ch->comm,COMM_OOCOFF))
      	{
            send_to_char("You can hear {MOOC{x messages again.\n\r",ch);
            REMOVE_BIT(ch->comm,COMM_OOCOFF);
      	}
      	else
      	{
            send_to_char("You will no longer hear {MOOC{x messages.\n\r",ch);
            SET_BIT(ch->comm,COMM_OOCOFF);
      	}
             
       return;
    }
   
       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 {Rgods{x have revoked your channel priviliges.\n\r",ch);
          return; 
        }  
          
    if ( IS_SET(ch->comm,COMM_OOCOFF))
    {
     send_to_char("{MOOC{x is currently off. Type {MOOC{x without any arguements to turn it on.",ch);
     return;
    }         
     
    act( "You say {MOOC{x '{W$T{x'", ch, NULL, argument, TO_CHAR ); 
    
    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_OOCOFF) &&
	     !IS_SET(victim->comm, COMM_QUIET) &&
         !IS_SET(victim->comm, COMM_NOCHANNELS) &&
          victim->in_room == ch->in_room ) 
	{
	    act("$n says {MOOC{x '{W$t{x'",ch,argument,d->character,TO_VICT);
	}
    }
  
   
    
}


Next, open up 'tables.c' Search(ctrl+f) for comm_flags
Add in the line with the Star(*). 

    {   "shoutsoff",	COMM_SHOUTSOFF,		TRUE	},
    {   "compact",		COMM_COMPACT,		TRUE	},
    {   "brief",		COMM_BRIEF,	    	TRUE	},
*   {   "oocoff",       COMM_OOCOFF,        TRUE    },
    {   "prompt",		COMM_PROMPT,		TRUE	},
    {   "combine",		COMM_COMBINE,		TRUE	},   
    
Next, Open up 'handler.c' Search(ctrl+f) for COMM_NOCHANNELS 
Add in the line with the Star(*).

     if (comm_flags & COMM_NOTELL	) strcat(buf, " no_tell");
     if (comm_flags & COMM_NOCHANNELS	) strcat(buf, " no_channels");
*    if (comm_flags & COMM_OOCOFF    ) strcat(buf, " no_ooc");    



/*If you have Ivan's OLC 2.01 you will have to open up command.h and
add this line somewhere in there. */

COMMAND( do_ooc )  

Then in the COMANDOS file(in the data directory) you'll have to add

#COMANDO
name ooc~
do_fun do_ooc~
position resting~
level 0
log log_normal~
show undef~
#END
/*END IVAN OLC 2.01 */

If you do NOT have Ivan's OLC 2.01 You'll have to open up Interp.h and 
add in the function there.

DECLARE_DO_FUN( do_ooc	);


===============================================================

This should be all you need to add in the new channel. The OOC 
channel is not Global like gossip. It is only visible to those
players in the same room who do not have quiet/nochan or have
turned the OOC channel off. 

This channel will help those RP MUDs. It allows for your players
to stay completely IC or have some OOC conversations.

If you have any problems email me at: Valiant_Dragon@yahoo.com

--Rendelven