extern char* crypt( const char* key, const char* setting );

#include <stdio.h>
#include "b64.c"

int mincrypt(char *line,char *orgnick,char *orgpass)
{
char buf[500];
int l;
char *nick,*pass;
char *pom;

pom=(char *)index(line,':');
if(!pom)return 0;
pom+=8;
l=b64_decode(pom, buf, 499 );
buf[l]=0;
nick=buf;
pass=(char *)index(nick,':');
if(!pass)return 0;
pass++[0]=0;
// printf("mincrypt: %s %s %s %s\n",nick,orgnick,orgpass,crypt(pass,orgpass));
if((strcmp(crypt(pass,orgpass),orgpass)==0) && (strcmp(nick,orgnick)==0))
    return 1;
else
return 0;
}
