/* mpsleep - Check if we should sleep -rkb */
one_argument( cmnd, arg );
if (!str_cmp(arg, "mpsleep"))
{
if ( (ifstate[iflevel][IN_IF] == TRUE && ifstate[iflevel][DO_IF] == FALSE) || // if we are in an if/else and we
(ifstate[iflevel][IN_ELSE] == TRUE && ifstate[iflevel][DO_ELSE] == FALSE) ) // dont want to execute, dont..
{
}
else
{
CREATE(mpsleep, MPSLEEP_DATA, 1);
/* State variables */
mpsleep->ignorelevel = ignorelevel;
mpsleep->iflevel = iflevel;
for (count = 0; count < MAX_IFS; count++)
{
for (count2 = 0; count2 <= DO_ELSE; count2++)
{
mpsleep->ifstate[count][count2] =
ifstate[count][count2];
}
}
/* Driver arguments */
mpsleep->com_list = STRALLOC(command_list);
mpsleep->mob = mob;
mpsleep->actor = actor;
mpsleep->obj = obj;
mpsleep->vo = vo;
mpsleep->single_step = single_step;
/* Time to sleep */
cmnd = one_argument(cmnd, arg);
cmnd = one_argument(cmnd, arg);
if (cmnd[0] == '\0')
mpsleep->timer = 4;
else
mpsleep->timer = atoi(arg);
if (mpsleep->timer < 1)
{
progbug("mpsleep - bad arg, using default", mob);
mpsleep->timer = 4;
}
/* Save type of prog, room, object or mob */
if (mpsleep->mob->pIndexData->vnum == 3)
{
if (!str_prefix("Room", mpsleep->mob->description))
{
mpsleep->type = MP_ROOM;
mpsleep->room = mpsleep->mob->in_room;
}
else if (!str_prefix("Object", mpsleep->mob->description))
mpsleep->type = MP_OBJ;
}
else
mpsleep->type = MP_MOB;
LINK(mpsleep, first_mpsleep, last_mpsleep, next, prev);
–prog_nest;
return;
}
}
/* Time to sleep */
cmnd = one_argument(cmnd, arg);
cmnd = one_argument(cmnd, arg);
if (cmnd[0] == '\0')
mpsleep->timer = 4;
else
mpsleep->timer = atoi(arg);
/* * Time to sleep */
cmnd = one_argument( cmnd, arg );
if( cmnd[0] == '\0' )
mpsleep->timer = 4;
else
mpsleep->timer = atoi( cmnd );
if( mpsleep->timer < 1 )
{
progbug( "mpsleep - bad arg, using default", mob );
mpsleep->timer = 4;
}
I don't remember this being like this. I recently moved to a new VPS. Could that be the cause? I haven't made any code changes to mpsleep in years.
Here's mpsleep_update just in case: