dccutil.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _DCCUTIL_H
  2. #define _DCCUTIL_H
  3. #include "common.h"
  4. #include "dcc.h"
  5. #include "auth.h"
  6. #define dprintf dprintf_eggdrop
  7. /* Public structure for the listening port map */
  8. struct portmap {
  9. port_t realport;
  10. port_t mappedto;
  11. struct portmap *next;
  12. };
  13. /* Fake idx's for dprintf - these should be ridiculously large +ve nums
  14. */
  15. #define DP_STDOUT 0x7FF1
  16. #define DP_LOG 0x7FF2
  17. #define DP_SERVER 0x7FF3
  18. #define DP_HELP 0x7FF4
  19. #define DP_STDERR 0x7FF5
  20. #define DP_MODE 0x7FF6
  21. #define DP_MODE_NEXT 0x7FF7
  22. #define DP_SERVER_NEXT 0x7FF8
  23. #define DP_HELP_NEXT 0x7FF9
  24. #define DP_DUMP 0x8000
  25. void init_dcc(void);
  26. void dumplots(int, const char *, char *);
  27. void dprintf(int, const char *, ...) __attribute__((format(printf, 2, 3)));
  28. void chatout(const char *, ...) __attribute__((format(printf, 1, 2)));
  29. void chanout_but(int, int, const char *, ...) __attribute__((format(printf, 3, 4)));
  30. void dcc_chatter(int);
  31. void trim_dcclist(int);
  32. void lostdcc(int);
  33. void makepass(char *);
  34. void tell_dcc(int);
  35. void not_away(int);
  36. void set_away(int, char *);
  37. void dcc_remove_lost(void);
  38. void flush_lines(int, struct chat_info *);
  39. struct dcc_t *find_idx(int);
  40. int new_dcc(struct dcc_table *, int);
  41. void del_dcc(int);
  42. char *add_cr(char *);
  43. void changeover_dcc(int, struct dcc_table *, int);
  44. void do_boot(int, char *, char *);
  45. int detect_dcc_flood(time_t *, struct chat_info *, int);
  46. void identd_open();
  47. void identd_close();
  48. port_t listen_all(port_t, bool);
  49. bool valid_idx(int);
  50. extern int max_dcc;
  51. extern time_t connect_timeout;
  52. #endif /* !_DCCUTIL_H */