argonath.c

demise/src/argonath.c · 688 B

From the archive dodbackup-final.tar.gz

Download the archive   « Back to the archive contents

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdarg.h>
#include "merc.h"

/* For prefix's ... heh --Argonath */
void
do_prefix (CHAR_DATA * ch, char *argument)
{
  char buffer[MSL];

  argument = one_argument (argument, buffer);

  if (ch->level < 10 || ch->trust < 10)
    {
      send_to_char ("Huh?\r\n", ch);
      return;
    }

  if (!buffer)
    {
      send_to_char ("Set your prefix to what?r\n", ch);
      return;
    }

  if (strlen (buffer) > 13)
    {
      send_to_char ("String length too long; Max 13 chars\r\n", ch);
      return;
    }

  free_string (ch->pcdata->prefix);
  ch->pcdata->prefix = str_dup (buffer);

  return;
}

Site Stats

Snippets: 1791
Codebases: 571