Lancsta~
password~
15 0 3 1
Testingchar~
Tyr~
Testingchar~
NEXT~
void fwrite_accounts ( void )
{
FILE *fptr;
char buf[MAX_STRING_LENGTH*10];
int i;
struct account_type *tmp;
// buf[0] = '\0';
#if !defined(WIN32)
SNP ( buf, "cp -f %s%s %s%s.bak > /dev/null", DATA_DIR, ACCOUNT_FILE, DATA$
if ( system ( buf ) == 1 )
{
bugf ( "Failed to BACKUP ACCOUNTS File. Aborting Write." );
}
#endif
buf[0] = '\0';
SNP ( buf, "%s%s", DATA_DIR, ACCOUNT_FILE );
if ( ( fptr = fopen ( buf, "w+" ) ) == NULL )
{
bugf ( "Failed Opening ACCOUNTS File for writing." );
return;
}
for ( tmp = account_list; tmp != NULL; tmp = tmp->next )
{
if (tmp->status == ACCT_REJECTED_DELETE)
continue; /* Acct Deleted */
fprintf ( fptr, "%s~\n", tmp->acc_name );
fprintf ( fptr, "%s~\n", tmp->password );
fprintf ( fptr, "%d %d %d %d\n", tmp->status,
tmp->permadead, tmp->heroes, tmp->legends );
for (i = 0; i < MAX_CHARS; i++)
{
if (tmp->char_name[i])
{
fprintf (fptr, "%12s~\n", tmp->char_name[i] );
}
}
fprintf (fptr, "NEXT~\n" );
}
fprintf ( fptr, "END~\n" );
fclose ( fptr );
return;
}
if (!strcmp (ch->name, ch->pcdata->account->char_name[i]) )
if (!strcasecmp (ch->name, ch->pcdata->account->char_name[i]) )
LIBS = -lz
FLAGS = -O2 -Wall -g3 $(PROF) $(NOCRYPT)
INCLUDES = -I.
PROF = -DOLD_RAND -DNOCRYPT
C_FLAGS = $(FLAGS) $(INCLUDES)
L_FLAGS = $(FLAGS) -O2 $(PROF) $(INCLUDES)
EXE = sundermud
CC = gcc
O_DIR = o/
tmp = alloc_perm ( sizeof ( struct account_type ), "account_type:load" );
tmp->next = NULL;
tmp->acc_name = str_dup ( word ); /* Email Address of Account */
for(i = 0; i < MAX_CHARS ; ++i ) tmp->char_name[i] = 0;
I have random data like race names, object short_descr, titles, all sorts of things. The accounts file is an online file, and a heavily modified version of Brian "Jobo" Graversen's account system. I think it may be being pulled from load_char where it looks up the account. Just a notice we didn't install or modify this code, it was stock in Sunder. I can pastebin any of the other functions when I get back from work. Thanks for any input.