IRCWebHooks
Barry Making admin auths optional 46d7b3c (3 years, 3 months ago)diff --git a/src/irc.c b/src/irc.c index adfcb73..633fc64 100644 --- a/src/irc.c +++ b/src/irc.c @@ -28,20 +28,24 @@ int auth(char *ident, char *vhost) { char *pt; - char *identlist = strdup(ADMIN_IDENT); - char *vhostlist = strdup(ADMIN_VHOST); +#ifdef ADMIN_IDENT + char *identlist = strdup(ADMIN_IDENT); pt = strtok(identlist,","); while (pt != NULL) { if (!strncmp(ident, pt, strlen(pt))) return 1; pt = strtok(NULL, ","); } +#endif +#ifdef ADMIN_VHOST + char *vhostlist = strdup(ADMIN_VHOST); pt = strtok(vhostlist,","); while (pt != NULL) { if (!strncmp(vhost, pt, strlen(pt))) return 1; pt = strtok(NULL, ","); } +#endif return 0; }