/* Personality module for MCM 1.1e */

/* Modify the routines in this module to suit your needs, but make */
/* sure that you include all of the listed subroutines.  If you send */
/* me (msawyer@mael.soest.hawaii.edu) your personality files, I will */
/* try to get as many included in the distribution as possible, but */
/* make no promises.  You may redistribute modified versions of this */
/* file. */

#include "mcm.h"

/* Initialization to be called at start of the program */

void per_init()
{
}

 /* Define a new signal processor for SIG_USR2.  There really isn't */
 /* that much need for this, but it is here in case you want it. */

void per_sig2()
{
}

 /* Define a routine to be run once per each time step */

void per_timestep()
{
}

 /* Define a pre-processor for the tell() call.  You may modify the */
 /* system and/or text fields, and should return TRUE if you want the */
 /* tell() to continue, or FALSE to fall out. */

int per_tell(msgfrom, msgto, system, text)
int msgfrom, msgto;
char *system, *text;
{
  return (TRUE);
}

 /* Define a pre-processor for the process() call.  You may call any */
 /* mcm or personality subroutines here and/or modify the command */
 /* variable.  Again, returning TRUE allows the process() to continue */

int per_process(msgfrom, command)
int msgfrom;
char *command;
{
  return (TRUE);
}

 /* Define a special processor to be run after each successful login */
 /* attempt. Here, read some defaults from the extra field. */

void per_login(msgfrom)
int msgfrom;
{
}

 /* Define a short routine to document any additional * and / commands */
 /* added by the per_process() call.  TRUE continues with the normal */
 /* help messages */

int per_slashhelp(msgfrom)
int msgfrom;
{
  return (TRUE);
}

int per_starhelp(msgfrom)
int msgfrom;
{
  return (TRUE);
}

 /* Now get additional mode help text */

int per_modehelp(msgfrom)
int msgfrom;
{
  return (TRUE);
}

 /* Define a pre-processor for the mode (*M) commands.  Again, you may */
 /* modify the command field, and returning TRUE runs the normal mode */
 /* commands on the modified text */

int per_mode(msgfrom, command)
int msgfrom;
char *command;
{
  return (TRUE);
}

 /* Define a set of processes to be called before and after rolling */
 /* the dice.  You may, in per_preroll() evaluate a modified roll */
 /* command (ie: /RH for roll to hit), modifying the command text to a */
 /* appropriate roll command (/Rd20).  You may then, in per_postroll() */
 /* modify the output string to a more appropriate message (ie: Hit */
 /* AC3).  If either routine returns FALSE, roll() will terminate, */
 /* assuming that the personality mode took care of the rest. */

int per_preroll(msgfrom, command)
int msgfrom;
char *command;
{
  return (TRUE);
}

int per_postroll(pubroll, job, res_text, res_val, number, sides, rolls)
int pubroll, job, res_val, number, sides;
char *res_text;
int rolls[50];
{
  return (TRUE);
}

 /* And finally a special process to be run when a user logs out. */
void per_logout(msgfrom)
int msgfrom;
{
}

