/***************************************************************************
 *                                                                         *
 *   UIEMSG.CPP                                                            *
 *                                                                         *
 *   Copyright (c) 1997 Galacticomm, Inc.                                  *
 *                                                                         *
 *                                                                         *
 *   Account Message Options Class.                                        *
 *                                                  - N.C. Osterc 10/21/98 *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"
#include "majorbbs.h"
#include "gcspsrv.h"
#include "galuieah.h"
#include "wgssup.h"
#include "uiemsg.h"

#define FILREV "$Revision: 3 $"

CHAR *huiekey;
INT timslc;
LONG mincreds;
CHAR *namchgky;
CHAR *comchgky;
CHAR *adrchgky;
CHAR *phochgky;
CHAR *syschgky;
CHAR *sexchgky;
CHAR *anschgky;
CHAR *scwchgky;
CHAR *sclchgky;
CHAR *pauchgky;
CHAR *edtchgky;
CHAR *pswchgky;
CHAR *msg_ulmpcl;
CHAR *msg_ulcpday;
CHAR *msg_comp1;
CHAR *msg_comp2;
CHAR *msg_comp3;
CHAR *msg_comp4;
CHAR *msg_sexmale;
CHAR *msg_sexfem;
CHAR *msg_ansion;
CHAR *msg_ansioff;
CHAR *msg_ansiauto;
CHAR *msg_outpaus;
CHAR *msg_outcont;
CHAR *msg_lineedt;
CHAR *msg_fseedt;
CHAR *msg_credhtml;
CHAR *msg_autolang;
CHAR *msg_pswhtml;

HMCVFILE uieAHMsg;
bool messagesInited=FALSE;             // have message options been initialized

MARKSOURCE(uieMsg);

uieMsg::uieMsg()                     // default constructor
{
     if (messagesInited) {
          return;
     }
     setmbk(supmb);
     mincreds=lngopt(MINCXF,0L,1000000000L);
     namchgky=stgopt(NAMCHGKY);
     comchgky=stgopt(COMCHGKY);
     adrchgky=stgopt(ADRCHGKY);
     phochgky=stgopt(PHOCHGKY);
     syschgky=stgopt(SYSCHGKY);
     sexchgky=stgopt(SEXCHGKY);
     anschgky=stgopt(ANSCHGKY);
     scwchgky=stgopt(SCWCHGKY);
     sclchgky=stgopt(SCLCHGKY);
     pauchgky=stgopt(PAUCHGKY);
     edtchgky=stgopt(EDTCHGKY);
     pswchgky=stgopt(PSWCHGKY);
     rstmbk();
     uieAHMsg=opnmsg("GALUIEAH.MCV");
     setmbk(uieAHMsg);
     huiekey=stgopt(HUIEKEY);
     timslc=numopt(TIMSLC,1,1000);
     msg_ulmpcl=stpans(stgopt(ULMPCL));
     msg_ulcpday=stpans(stgopt(ULCPDAY));
     msg_comp1=stpans(stgopt(COMP1));
     msg_comp2=stpans(stgopt(COMP2));
     msg_comp3=stpans(stgopt(COMP3));
     msg_comp4=stpans(stgopt(COMP4));
     msg_sexmale=stpans(stgopt(SEXMALE));
     msg_sexfem=stpans(stgopt(SEXFEM));
     msg_ansion=stpans(stgopt(ANSION));
     msg_ansioff=stpans(stgopt(ANSIOFF));
     msg_ansiauto=stpans(stgopt(ANSIAUTO));
     msg_outpaus=stpans(stgopt(OUTPAUS));
     msg_outcont=stpans(stgopt(OUTCONT));
     msg_lineedt=stpans(stgopt(LINEEDT));
     msg_fseedt=stpans(stgopt(FSEEDT));
     msg_credhtml=stpans(stgopt(CREDHTML));
     msg_autolang=stpans(stgopt(AUTOLANG));
     msg_pswhtml=stpans(stgopt(PSWHTML));
     rstmbk();
     messagesInited=TRUE;
}

uieMsg::~uieMsg()                    // destructor
{
     free(huiekey);
     free(namchgky);
     free(comchgky);
     free(adrchgky);
     free(phochgky);
     free(syschgky);
     free(sexchgky);
     free(anschgky);
     free(scwchgky);
     free(sclchgky);
     free(pauchgky);
     free(edtchgky);
     free(pswchgky);
     free(msg_ulmpcl);
     free(msg_ulcpday);
     free(msg_comp1);
     free(msg_comp2);
     free(msg_comp3);
     free(msg_comp4);
     free(msg_sexmale);
     free(msg_sexfem);
     free(msg_ansion);
     free(msg_ansioff);
     free(msg_ansiauto);
     free(msg_outpaus);
     free(msg_outcont);
     free(msg_lineedt);
     free(msg_fseedt);
     free(msg_credhtml);
     free(msg_autolang);
     free(msg_pswhtml);
     clsmsg(uieAHMsg);
     messagesInited=FALSE;
}
