30 Nov, 2008, Kayle wrote in the 21st comment:
Votes: 0
If you're in afkmud/src do the following:
cd ../system/
ls

After that look through the output and see if reserved.lst is there. If not, well, we'll see what happens. :P
30 Nov, 2008, darkestjustice wrote in the 22nd comment:
Votes: 0
pathofdarkness@zeno:~/afkmud/src$ cd ../system/
pathofdarkness@zeno:~/afkmud/system$ ls
WIZLIST channels.dat helps.dat immortal.host mudtitle.ans namegen.txt runeword.dat slay.dat time.dat
auth.dat commands.dat herbs.dat liquids.dat mudtitle.asc quotes.dat shellcommands.dat socials.dat tongues.dat
ban.lst conn.hst history.txt mixtures.dat mxp.style reserved.lst ships.dat specfuns.dat weapontypes.dat
boot.txt dns.dat holidays.dat morph.dat mxpobjcmds.dat runes.dat skills.dat sysdata.dat weather.dat
pathofdarkness@zeno:~/afkmud/system$

pathofdarkness@zeno:~/afkmud/system$ pico ban.lst
pathofdarkness@zeno:~/afkmud/system$


…..nothing found. Just the word 'END,' so, this is probably the list that'll generate if I have to ban a player….

pathofdarkness@zeno:~/afkmud/system$ pico namegen.txt
pathofdarkness@zeno:~/afkmud/system$


….nothing found. Just a bunch of random letters placed together. This is probably the file that'll randomly generate a player name for new players…..

pathofdarkness@zeno:~/afkmud/system$ pico reserved.lst
pathofdarkness@zeno:~/afkmud/system$

…..And we hit pay-dirt. I did a quick ^w when I was in the reserved.lst and typed "Walter" and boom. There it was.
Changed the list, and boom. All was kosher! Thanks so much!
30 Nov, 2008, Kayle wrote in the 23rd comment:
Votes: 0
Np.
01 Dec, 2008, darkestjustice wrote in the 24th comment:
Votes: 0
New challenge for you. My who list looks absolutely horrid to me. The players names appear in Green and they stack horizontal (not vertical), which means that generally, titles are newlined to the next line. I did a 'grep who *.cpp' in my src directory, and lemme tell you what a bad idea that was. It was actively showing me search results for 2 solid minutes (but….thats probably because I'm on dialup). Question is, with AFKMud, can I alter the way the who list looks in the game, or do I have to do it in the shell? And if I have to do it in the shell, where should I start?
01 Dec, 2008, darkestjustice wrote in the 25th comment:
Votes: 0
I found this when I did a grep in the imc.cpp file….

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

pathofdarkness@zeno:~/afkmud/src$ grep who imc.cpp
who_template *whot = NULL;
bool imc_isbanned( const string & who )
if( !str_cmp( name, imc_mudof( who ) ) )
string get_local_chanwho( imc_channel * c )
PFUN( imc_recv_chanwhoreply )
PFUN( imc_recv_chanwho )
string cwho = get_local_chanwho( c );
if( ( cwho.empty( ) || cwho == "" || cwho == "Nobody" ) && q->to == "*" )
buf << cwho;
p = new imc_packet( "*", "ice-chan-whoreply", q->from );
void imc_send_whoreply( const string & to, const string & txt )
p = new imc_packet( "*", "who-reply", to );
void imc_send_who( const string & from, const string & to, const string & type )
p = new imc_packet( from, "who", to );
string process_who_head( int plrcount, int maxcount )
string head = whot->head;
string process_who_tail( int plrcount, int maxcount )
string tail = whot->tail;
string pline = whot->plrline;
string pline = whot->immline;
string process_who_template( const string & head, const string & tail, const string & plrlines, const string & immlines, const string & plrheader, const string & immheader )
string master = whot->master;
string imc_assemble_who( void )
ostringstream whoreply, whobuf, whobuf2;
plrheader = whot->plrheader;
immheader = whot->immheader;
string head = process_who_head( pcount, sysdata->maxplayers );
string tail = process_who_tail( pcount, sysdata->maxplayers );
string master = process_who_template( head, tail, plrlines, immlines, plrheader, immheader );
whoreply << master;
whoreply << "~Y[~W" << num_logins << " logins since last reboot on " << str_boot_time << "~Y]";
return whoreply.str( );
void imc_process_who( const string & from )
string whoreply = imc_assemble_who( );
imc_send_whoreply( from, whoreply );
imc_send_whoreply( from, "No such player is online.\r\n" );
imc_send_whoreply( from, "No such player is online.\r\n" );
imc_send_whoreply( from, buf.str( ) );
PFUN( imc_recv_who )
if( keymap["type"] == "who" )
imc_process_who( q->from );
buf << keymap["type"] << " is not a valid option. Options are: who, finger, or info." << endl;
imc_send_whoreply( q->from, buf.str( ) );
PFUN( imc_recv_whoreply )
void imc_send_whoisreply( const string & to, const string & data )
p = new imc_packet( "*", "whois-reply", to );
PFUN( imc_recv_whoisreply )
void imc_send_whois( const string & from, const string & user )
p = new imc_packet( from, "whois", user );
PFUN( imc_recv_whois )
imc_send_whoisreply( q->from, buf.str( ) );
imc_register_packet_handler( "who", imc_recv_who );
imc_register_packet_handler( "who-reply", imc_recv_whoreply );
imc_register_packet_handler( "whois", imc_recv_whois );
imc_register_packet_handler( "whois-reply", imc_recv_whoisreply );
imc_register_packet_handler( "ice-chan-who", imc_recv_chanwho );
imc_register_packet_handler( "ice-chan-whoreply", imc_recv_chanwhoreply );
* This might seem slow, but we need to track muds who don't send is-alive packets
void parse_who_header( string & head )
void parse_who_tail( string & tail )
void imc_load_who_template( void )
imclog( "%s: Unable to load template file for imcwho", __FUNCTION__ );
whot = NULL;
if( whot )
deleteptr( whot );
whot = new who_template;
parse_who_header( value );
whot->head = value;
parse_who_tail( value );
whot->tail = value;
whot->plrline = value;
whot->immline = value;
whot->immheader = value;
whot->plrheader = value;
whot->master = value;
imc_load_who_template( );
deleteptr( whot );
* … and the templates. Checks for whot being defined, but the others are loaded here to, so….
if( !whot )
IMC_CMD( imcwho )
imc_to_char( "imcwho which mud? See imclist for a list of connected muds.\r\n", ch );
* Now why didn't I think of this before for local who testing?
imc_to_char( imc_assemble_who( ), ch );
imc_send_who( CH_IMCNAME( ch ), argument, "who" );
imc_to_char( "imclocate who?\r\n", ch );
imc_send_whois( CH_IMCNAME( ch ), user.str( ) );
imc_send_who( CH_IMCNAME( ch ), imc_mudof( command ), name.str( ) );
imc_send_who( CH_IMCNAME( ch ), argument, "info" );
IMC_CMD( imcchanwho )
imc_to_char( "Usage: imcchanwho <channel> [<mud> <mud> <mud> <…>|<all>]\r\n", ch );
p = new imc_packet( CH_IMCNAME( ch ), "ice-chan-who", mud );
p = new imc_packet( CH_IMCNAME( ch ), "ice-chan-who", "*" );
imc_printf( ch, "~G%s", get_local_chanwho( c ).c_str( ) );
imc_load_who_template( );
pathofdarkness@zeno:~/afkmud/src$

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

I think that the who list is in there, can anyone with a bit more experience take a look and tell me if I'm headed in the right direction? And if I'm not, perhaps point in the right direction, please? Thanks in advance!
01 Dec, 2008, Zeno wrote in the 26th comment:
Votes: 0
The color command should change colors of wholist, etc.
01 Dec, 2008, darkestjustice wrote in the 27th comment:
Votes: 0
I'll show you all the files that we have involving color, maybe then we can figure out which way i need to go from there?….

======================================================================================
help COLOR
Help level: 0
Syntax: color | default
Syntax: color _reset_ (Resets all colors to default set)
Syntax: color _all_ (Sets all color types to )
Syntax: color theme [name] (Sets all color types to a defined theme)

This command allows you to change the default colors for various things. Typing the command
without an argument gives you a list of what you can change, along with the colors you can
change it to.

.
..

….
…..
….

..
.

color
Syntax: color | default
Syntax: color _reset_ (Resets all colors to default set)
Syntax: color _all_ (Sets all color types to )
Syntax: color theme [name] (Sets all color types to a defined theme)

********************************[ COLORS ]*********************************
black dred dgreen orange dblue purple cyan grey
dgrey red green yellow blue pink lblue white

************************************************************
plain action say chat yells tell hit hitme
immortal hurt falling danger magic consider report poison
social dying dead skill carnage damage fleeing rmname
rmdesc objects people list bye gold gtells note
hungry thirsty fire sober wearoff exits score reset
log die_msg wartalk arena muse think aflags who
racetalk ignore whisper divider morph shout rflags stype
aname auction score2 score3 score4 who2 who3 who4
intermud helpfiles who5 score5 who6 who7 prac prac2
prac3 prac4 UNUSED guildtalk board board2 board3

Available colors are:
black dred dgreen orange dblue purple cyan grey
dgrey red green yellow blue pink lblue white

The following themes are available:
rabbitus smaug AFK

.
..

….
…..
….

..
.

help COLORS
Help level: 101
The ability to color Help and other files is very useful. We ask
that you try to stick to these guidelines for color usage so that
we can have some consistency in their use:

Here are some outlines for using color on a white text file:
Help (Filename) colored cyan.
Laws (Law) Colored green.
Attacker/Killer/Thief colored pink.
Order/Guild (Order/Guild) colored green.
Clans (Clan) colored red.
Syntax for sytax references, colored yellow.
Deities (Deity) colored cyan.
Deadly/Deadlies colored red.
Config (+/- option) colored yellow.

If you wish to add other colors to your file, please use good
taste, make sure it is readable and don't get too wacky. If
you follow the above guidelines and stick to using white for
all other text, it will keep the text solid and legible. Should
you choose not to use any colors at all, that is also okay, the
above guidelines are merely for proper use of color, white is
always acceptable.

In addition, please keep in mind that the following topics should
not be colored except by their defaults:
- Help (area name)
- Help (skill)
- Help (spell)
- Help (class)

.
..

….
…..
….

..
.

And…..unfortunately, that's all I've got as far as color files. 2 helpfiles, 'help COLOR' and 'help COLORS' and one file with just the command 'color.' I spent 45 minutes figuring out that the & symbol was the color code for it. Then I had to go through every letter of the alpha upper and lowercase to find the colors used. When I switch to the AFK, Smaug, or rabbitus color themes, the colors are horrid. The owner would rather like to customize the who list to his liking, which is why he's set me out on this task. Any advice or suggestions from here?
01 Dec, 2008, Zeno wrote in the 28th comment:
Votes: 0
Help color should explain what to do.

Basically you need to modify the colors to what you want, then overwrite (save) the default theme.
01 Dec, 2008, Sharmair wrote in the 29th comment:
Votes: 0
Unless they moved it, do_who should be about in the middle of act_info.cpp.
01 Dec, 2008, Kayle wrote in the 30th comment:
Votes: 0
You'll find do_who, and the actual meat of the function in player.cpp. AFKMud used to support three separate interfaces, but at some point two of them were removed.

To customize the colors, you'll need to customize a theme, you do that by changing the colors of every option displayed in the color command by doing something like: color wartalk red
Which would then set anything using AT_WARTALK or &[wartalk] to red. Once you have all the colors set up to your liking, you do color savetheme default to save it as the default theme, then you simply delete all the others but default, unless you want to allow players to use them. Another option is to go into color.cpp and change this:
/* All defaults are set to Alsherok default scheme, if you don't 
like it, change it around to suite your own needs - Samson */
const short default_set[MAX_COLORS] =
{
AT_BLACK, AT_BLOOD, AT_DGREEN, AT_ORANGE, /* 3 */
AT_DBLUE, AT_PURPLE, AT_CYAN, AT_GREY, /* 7 */
AT_DGREY, AT_RED, AT_GREEN, AT_YELLOW, /* 11 */
AT_BLUE, AT_PINK, AT_LBLUE, AT_WHITE, /* 15 */
AT_BLACK_BLINK, AT_BLOOD_BLINK, AT_DGREEN_BLINK, AT_ORANGE_BLINK, /* 19 */
AT_DBLUE_BLINK, AT_PURPLE_BLINK, AT_CYAN_BLINK, AT_GREY_BLINK, /* 23 */
AT_DGREY_BLINK, AT_RED_BLINK, AT_GREEN_BLINK, AT_YELLOW_BLINK, /* 27 */
AT_BLUE_BLINK, AT_PINK_BLINK, AT_LBLUE_BLINK, AT_WHITE_BLINK, /* 31 */
AT_GREY, AT_GREY, AT_BLUE, /* 34 */
AT_GREEN, AT_LBLUE, AT_WHITE, AT_GREY, /* 38 */
AT_GREY, AT_YELLOW, AT_GREY, AT_GREY, /* 42 */
AT_GREY, AT_BLUE, AT_GREY, AT_GREY, /* 46 */
AT_DGREEN, AT_CYAN, AT_GREY, AT_GREY, /* 50 */
AT_BLUE, AT_GREY, AT_GREY, AT_GREY, /* 54 */
AT_RED, AT_GREY, AT_BLUE, AT_PINK, /* 58 */
AT_GREY, AT_GREY, AT_YELLOW, AT_GREY, /* 62 */
AT_GREY, AT_ORANGE, AT_BLUE, AT_RED, /* 66 */
AT_GREY, AT_GREY, AT_GREEN, AT_DGREEN, /* 70 */
AT_DGREEN, AT_ORANGE, AT_GREY, AT_RED, /* 74 */
AT_GREY, AT_DGREEN, AT_RED, AT_BLUE, /* 78 */
AT_RED, AT_CYAN, AT_YELLOW, AT_PINK, /* 82 */
AT_DGREEN, AT_PINK, AT_WHITE, AT_BLUE, /* 86 */
AT_BLUE, AT_BLUE, AT_GREEN, AT_GREY, /* 90 */
AT_GREEN, AT_GREEN, AT_YELLOW, AT_DGREY, /* 94 */
AT_GREEN, AT_PINK, AT_DGREEN, AT_CYAN, /* 98 */
AT_RED, AT_WHITE, AT_BLUE, AT_DGREEN, /* 102 */
AT_CYAN, AT_BLOOD, AT_RED, AT_DGREEN, /* 106 */
AT_GREEN, AT_GREY, AT_GREEN, AT_WHITE /* 110 */
};

The one thing I can't stress enough is to not change the colors above the line marked as /* 34 */. Use the pc_displays struct just above this one to see what the color corresponds to.
03 Dec, 2008, tphegley wrote in the 31st comment:
Votes: 0
And if you want to get more in depth, you can change around the way the who command looks by editing the do_who command itself. This is actually one of the first places I started to learn to code because I wanted the smaug who list to look like the game that I played on. Make a backup of your player.cpp (in regular smaugfuss it's in the act_info.c file) and then just mess around with the code until you figure out what you're doing.

***EDIT***

To find your do_who cmd grep for do_who

grep 'do_who' *.cpp -ni

The 'n' and 'i' will give you the line number that the do_who function is on and makes your search case insensitive.

In order to go to the line then put the number in once you're in the file and then hit 'G' (notice the uppercase)

So in the afkmud 1.9 or whatever the line is 1225 in player.cpp, so you're command would be:

vi player.cpp
1225G

and voila you'll be on line 1225.

IMHO, afkmud is more advanced then smaug. I taught myself how to code (probably not properly) on smaug. It's much easier to learn on.
03 Dec, 2008, tphegley wrote in the 32nd comment:
Votes: 0
I'm not sure what you mean when you say your who is all messed up. Here is the output to afkmud when I started it up:

-=[ AFKMud ]=-

——————————–=[ Players ]=———————————

Warrior [—–] Bob the Novice
Mage [—–] Dole the Lesser Apprentice

[2 Players] [Homepage: No page set] [2 Max since reboot]
[3 logins since last reboot on Wed Dec 3, 2008 11:12:28 AM EST]


What is your who output?
03 Dec, 2008, tphegley wrote in the 33rd comment:
Votes: 0
Here is the do_who function:

/* Derived directly from the i3who code, which is a hybrid mix of Smaug, RM, and Dale who. */
int afk_who( char_data * ch, char *argument )
{
list<descriptor_data*>::iterator ds;
vector<char_data*> players;
vector<char_data*> immortals;
vector<char_data*>::iterator iplr;
char s1[16], s2[16], s3[16], s4[16], s5[16], s6[16], s7[16];
int pcount = 0;

if( !ch )
{
bug( "%s: Called with no *ch!", __FUNCTION__ );
return 0;
}


snprintf( s1, 16, "%s", ch->color_str( AT_WHO ) );
snprintf( s2, 16, "%s", ch->color_str( AT_WHO2 ) );
snprintf( s3, 16, "%s", ch->color_str( AT_WHO3 ) );
snprintf( s4, 16, "%s", ch->color_str( AT_WHO4 ) );
snprintf( s5, 16, "%s", ch->color_str( AT_WHO5 ) );
snprintf( s6, 16, "%s", ch->color_str( AT_WHO6 ) );
snprintf( s7, 16, "%s", ch->color_str( AT_WHO7 ) );

players.clear();
immortals.clear();

// Construct the two vectors.
for( ds = dlist.begin(); ds != dlist.end(); ++ds )
{
descriptor_data *d = (*ds);
char_data *person = d->original ? d->original : d->character;

if( person && d->connected >= CON_PLAYING )
{
if( !ch->can_see( person, true ) || is_ignoring( person, ch ) )
continue;

if( person->level >= LEVEL_IMMORTAL )
immortals.push_back( person );
else
players.push_back( person );
}
}

// Display any players who were visible to the person calling the command.
if( !players.empty() )
{
pcount += players.size();


ch->pagerf( "\r\n%s——————————–=[ %sPlayers %s]=———————————
\r\n\r\n",
s7, s6, s7 );

for( iplr = players.begin(); iplr != players.end(); ++iplr )
{
char_data *player = *iplr;

ch->pager( output_person( ch, player ) );
}
}

// Display any immortals who were visible to the person calling the command.
if( !immortals.empty() )
{
pcount += immortals.size();

ch->pagerf( "\r\n%s——————————-=[ %sImmortals %s]=——————————–
\r\n\r\n",
s1, s6, s1 );

for( iplr = immortals.begin(); iplr != immortals.end(); ++iplr )
{
char_data *player = *iplr;

ch->pager( output_person( ch, player ) );
}
}
return pcount;
}


CMDF( do_who )
{
char buf[MSL], buf2[MSL], outbuf[MSL];
char s1[16], s2[16], s3[16];
int amount = 0, xx = 0, pcount = 0;

snprintf( s1, 16, "%s", ch->color_str( AT_WHO ) );
snprintf( s2, 16, "%s", ch->color_str( AT_WHO6 ) );
snprintf( s3, 16, "%s", ch->color_str( AT_WHO2 ) );

outbuf[0] = '\0';
snprintf( buf, MSL, "%s-=[ %s%s %s]=-", s1, s2, sysdata->mud_name, s1 );
snprintf( buf2, MSL, "&R-=[ &W%s &R]=-", sysdata->mud_name );
amount = 78 - color_strlen( buf2 ); /* Determine amount to put in front of line */

if( amount < 1 )
amount = 1;

amount = amount / 2;

for( xx = 0; xx < amount; ++xx )
mudstrlcat( outbuf, " ", MSL );

mudstrlcat( outbuf, buf, MSL );
ch->pagerf( "%s\r\n", outbuf );

pcount = afk_who( ch, argument );

ch->pagerf( "\r\n%s[%s%d Player%s%s] ", s3, s2, pcount, pcount == 1 ? "" : "s", s3 );
if( ch->MXP_ON( ) )
{
ch->
pagerf( "%s[%sHomepage: " MXP_TAG_SECURE "<a href='%s' hint='%s Homepage'>%s</a>" MXP_TAG_LOCKED
"%s] [%s%3d Max Since Reboot%s]\r\n", s3, s2, sysdata->http, sysdata->mud_name, sysdata->h
ttp, s3, s2,
sysdata->maxplayers, s3 );
}
else
{
ch->pagerf( "%s[%sHomepage: %s%s] [%s%d Max since reboot%s]\r\n",
s3, s2, sysdata->http, s3, s2, sysdata->maxplayers, s3 );
}
ch->pagerf( "%s[%s%d login%s since last reboot on %s%s]\r\n", s3, s2,
num_logins, num_logins == 1 ? "" : "s", str_boot_time, s3 );
}


This is what is setting your colors. Maybe they have been set to all green? Not sure. My who list had colors in it.

snprintf( s1, 16, "%s", ch->color_str( AT_WHO ) );
snprintf( s2, 16, "%s", ch->color_str( AT_WHO2 ) );
snprintf( s3, 16, "%s", ch->color_str( AT_WHO3 ) );
snprintf( s4, 16, "%s", ch->color_str( AT_WHO4 ) );
snprintf( s5, 16, "%s", ch->color_str( AT_WHO5 ) );
snprintf( s6, 16, "%s", ch->color_str( AT_WHO6 ) );
snprintf( s7, 16, "%s", ch->color_str( AT_WHO7 ) );


The AT_WHO# is what is in your color command and is what you can change. Look for s1, s2, s3, s4…and so on to determine where the colors go.
20.0/33