Abbreviations for objects, mobs and players.

From: Jörgen (
Date: 07/07/96

Content-MD5: By1UYYGWLrZerjN9GFNVLg==
Precedence: bulk
Content-Transfer-Encoding: 7bit

If someone is interested I have a piece of code that will allow everything
to be abbreviated. Instead of typing 'kill mobwithaverylongandcomplicatedname'
you could type 'kill mob'. It's VERY appreciated by players.

Here it is:

in handler.c, change isname() to this:

#define WHITESPACE " \t"

int isname(char *str, char *namelist)
  char *newlist;
  char *curtok;

  newlist = strdup(namelist); /* make a copy since strtok 'modifies' strings */

  for(curtok = strtok(newlist, WHITESPACE); 
      curtok; curtok = strtok(NULL, WHITSPACE))
     if(curtok && is_abbrev(str, curtok))
        return 1;

  return 0;

This will check for an abbreviation on every word in the namelist.

// Zigg

This archive was generated by hypermail 2b30 : 12/07/00 PST