auth.h 976 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. time_t authtime; /* what time they authed at */
  8. time_t atime; /* when they last were active */
  9. int authed;
  10. int authing;
  11. # ifdef S_AUTHHASH
  12. char hash[MD5_HASH_LENGTH + 1]; /* used for dcc authing */
  13. # endif /* S_AUTHHASH */
  14. char nick[NICKLEN];
  15. char host[UHOSTLEN];
  16. };
  17. # endif
  18. /* S_AUTHCMDS */
  19. # ifdef S_AUTHCMDS
  20. int new_auth();
  21. int findauth(char *);
  22. void removeauth(int);
  23. # endif/* S_AUTHCMDS */
  24. # if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  25. char *makehash(struct userrec *, char *);
  26. # endif/* S_AUTHHASH || S_DCCAUTH */
  27. # ifdef S_AUTHCMDS
  28. extern int auth_total;
  29. extern struct auth_t *auth;
  30. # endif
  31. /* S_AUTHCMDS */
  32. # if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  33. extern char authkey[121];
  34. # endif
  35. /* S_AUTHHASH || S_DCCAUTH */
  36. #endif /* !_AUTH_H */