dccutil.h 1.5 KB

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