Snippets format?

Posted by Kalados on Sun 15 Nov 2009 09:32 AM — 3 posts, 16,185 views.

#0
I've got a guide (http://www.auricmud.com/snippets/new-channel.html) On how to make a channel, and I have no problem getting into those files and editing them just unsure as to where exactly I should put those snippets.

For example:

"You would add a line similar to this to add your 'ooc' channel to the 'channels' display."

Where exactly do I enter the code that follows? Just hit enter plug it in and indent?

If someone could point me in the right direction? Thanks.
Canada #1
Yes, that's pretty much it.

Looking at that snippet, once you find each line regarding the "yell" channel, simply return from the end of the line and copy/paste the "ooc" channel info they give.

For example, the first direction they give;
      ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_YELL ) ? " &G+YELL" : " &g-yell" );
      ch_printf_color( ch, "%s",   !IS_SET( ch->deaf, CHANNEL_OOC )    ?
				                " &G+OOC"	          :
						" &R-ooc" );

Which kinda looks ugly so I would reformat it to remove the spaces in the 2 extra lines so that it all lines up into one.
ch_printf_color( ch, "%s",   !IS_SET( ch->deaf, CHANNEL_OOC ) ? " &G+OOC" : " &R-ooc" );


Continue the same with the rest of the new additional code lines, and don't forget to make clean when finished.
#2
Thanks!