auth.h 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 hand[NICKLEN];
  16. char host[UHOSTLEN];
  17. };
  18. # endif
  19. /* S_AUTHCMDS */
  20. # ifdef S_AUTHCMDS
  21. int new_auth();
  22. int findauth(char *);
  23. void removeauth(int);
  24. # endif/* S_AUTHCMDS */
  25. # if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  26. char *makehash(struct userrec *, char *);
  27. # endif/* S_AUTHHASH || S_DCCAUTH */
  28. # ifdef S_AUTHCMDS
  29. extern int auth_total;
  30. extern struct auth_t *auth;
  31. # endif
  32. /* S_AUTHCMDS */
  33. # if defined(S_AUTHHASH) || defined(S_DCCAUTH)
  34. extern char authkey[121];
  35. # endif
  36. /* S_AUTHHASH || S_DCCAUTH */
  37. #endif /* !_AUTH_H */