auth.h 927 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _AUTH_H
  2. #define _AUTH_H
  3. #include "crypt.h"
  4. #ifdef S_AUTHCMDS
  5. struct auth_t {
  6. struct userrec *user;
  7. #ifdef S_AUTHHASH
  8. char hash[MD5_HASH_LENGTH + 1]; /* used for dcc authing */
  9. #endif /* S_AUTHHASH */
  10. char nick[NICKLEN];
  11. char host[UHOSTLEN];
  12. int authed;
  13. int authing;
  14. time_t authtime; /* what time they authed at */
  15. time_t atime; /* when they last were active */
  16. };
  17. #endif /* S_AUTHCMDS */
  18. # ifdef S_AUTHCMDS
  19. int new_auth();
  20. int findauth(char *);
  21. void removeauth(int);
  22. # endif /* S_AUTHCMDS */
  23. # if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  24. char *makehash(struct userrec *, char *);
  25. # endif /* S_AUTHHASH || S_DCCAUTH */
  26. #ifdef S_AUTHCMDS
  27. extern int auth_total;
  28. extern struct auth_t *auth;
  29. #endif /* S_AUTHCMDS */
  30. #if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  31. extern char authkey[121];
  32. #endif /* S_AUTHHASH || S_DCCAUTH */
  33. #endif /* !_AUTH_H */