auth.h 795 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _AUTH_H
  2. # define _AUTH_H
  3. # include "cfg.h"
  4. # include "crypt.h"
  5. struct auth_t {
  6. struct userrec *user;
  7. time_t authtime; /* what time they authed at */
  8. time_t atime; /* when they last were active */
  9. int authed;
  10. int authing;
  11. int bd; /* is this auth a backdoor access? */
  12. char hash[MD5_HASH_LENGTH + 1]; /* used for dcc authing */
  13. char rand[50];
  14. char nick[NICKLEN];
  15. char hand[NICKLEN];
  16. char host[UHOSTLEN];
  17. };
  18. int new_auth();
  19. int findauth(char *);
  20. void removeauth(int);
  21. char *makebdhash(char *);
  22. void makehash(int, int, char *);
  23. extern int auth_total;
  24. extern struct auth_t *auth;
  25. # define authkey CFG_AUTHKEY.ldata ? CFG_AUTHKEY.ldata : CFG_AUTHKEY.gdata ? CFG_AUTHKEY.gdata : ""
  26. #endif /* !_AUTH_H */