#include "SysUser.h"

#include <link/io.h>

BOOL SelectSIG(char mode)
{
   if (!INSTACK)  ListSIGS(&User,mode,1);

   Sig.number=iinput(1,255,0, SA[2323]);
   TwoLines();

   if (!Sig.number)
   {
      AFPrintf(&UserDat, sout, SA[2324]);
      Sig.number = 0;
      ASPrintf(NULL, areafile,"%s:Area.bbs",(mode)?"FILE":"MSG");
      return(TRUE);
   }

   ASPrintf(NULL, areafile,"DLGCONFIG:SIGS/SIGS.%s",(mode)?"FILE":"MSG");

   if (GetStruct(areafile, (char *)&Sig, sizeof(Sig),1)==-1 || Sig.level>User.User_Level)
   {
      Sig.number = 0;
      AFPrintf(&UserDat, sout, SA[2325]);
      return(FALSE);
   }

   ASPrintf(NULL, areafile,"DLGCONFIG:SIGS/%s.%s",Sig.name,(mode)?"FILE":"MSG");
   return(TRUE);
}


