This is easy enough. This is taken from my code (I'm going to assume you have SMAUG):
find the end of the nanny function in comm.c, which should look like this (or something similar):
act( AT_ACTION, "$n has entered the game.", ch, NULL, NULL, TO_ROOM );
do_look( ch, "auto" );
mail_count(ch);
break;
}
return;
}
Then just make it look like this this:
act( AT_ACTION, "$n has entered the game.", ch, NULL, NULL, TO_ROOM );
sprintf( buf, "%s has connected to the game", ch->name );
echo_to_all( AT_GREEN, buf, ECHOTAR_ALL );
do_look( ch, "auto" );
mail_count(ch);
break;
}
return;
}
Then at the top of do_quit in act_comm.c, define buf. Then, go down and find the line:
act( AT_BYE, "$n has left the game.", ch, NULL, NULL, TO_ROOM );
After that line, add this:
sprintf( buf, "%s has disconnected from the game", ch->name );
echo_to_all( AT_GREEN, buf, ECHOTAR_ALL );
Of course you can change AT_GREEN to whatever color you want. As for the OOC channel or w/e, you just have to mess with your channel files and settings. Follow the steps below:
Stick this function in act_comm.c
void do_ooc( CHAR_DATA *ch, char *argument )
{
talk_channel( ch, argument, CHANNEL_OOC, "ooc" );
return;
}
Update tables.c to include the do_ooc function so you can use it on your mud (once this compiles, create it by doing cedit ooc create do_ooc ). You need to update the talk_channel function. Look through the function and find the line that says:
switch ( channel )
Below it should be lots of stuff. If its not in there already, just add something similar to this:
case CHANNEL_OOC:
set_char_color( AT_OOC, ch );
sprintf( buf, "(OOC) $n: $t" );
position = ch->position;
ch->position = POS_STANDING;
act( AT_OOC, buf, ch, argument, NULL, TO_CHAR );
ch->position = position;
break;
Just note that that is what mine is, your can be different depending on how you want things done and whatnot. It will require tinkering. Also, one last thing, you may need to update mud.h. If so (you'll get an error about AT_OOC not exisiting), go into mud.h and search for something similar to this:
#define AT_RED 9
Just go to the last one and add:
#define AT_OOC 20
Note: 20 should be the number of the last one + 1. I'm not sure why you don't have an OOC channel with stock though.
Sorry if this was just blaber and you don't understand. All of this is in relation to my SWR 1.0 FUSS modified codebase, so yeah.
Good luck.
|