home *** CD-ROM | disk | FTP | other *** search
- /*
- * VALIDUSER.C
- *
- * (C) Copyright 1989-1990 by Matthew Dillon, All Rights Reserved.
- */
-
- #include "stdio.h"
- #include "config.h"
-
- Prototype int ValidUser (const char *);
-
- int
- ValidUser (const char *str)
- {
- register unsigned char
- c;
-
- if (*str == '|' || *str == '@')
- return 0;
-
- while (c = (unsigned char) *str) {
- if ((c < 32 || c > 126) || c == ':' || c == '/')
- return 0;
- ++str;
- }
-
- return 1;
- }
-