dccutil.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 init_dcc(void);
  25. void dprintf(int, const char *, ...) __attribute__((format(printf, 2, 3)));
  26. void chatout(const char *, ...) __attribute__((format(printf, 1, 2)));
  27. void chanout_but(int, int, const char *, ...) __attribute__((format(printf, 3, 4)));
  28. void dcc_chatter(int);
  29. void trim_dcclist(int);
  30. void lostdcc(int);
  31. void makepass(char *);
  32. void tell_dcc(int);
  33. void not_away(int);
  34. void set_away(int, char *);
  35. void dcc_remove_lost(void);
  36. void flush_lines(int, struct chat_info *);
  37. struct dcc_t *find_idx(int);
  38. int new_dcc(struct dcc_table *, int);
  39. void del_dcc(int);
  40. char *add_cr(char *);
  41. void changeover_dcc(int, struct dcc_table *, int);
  42. void do_boot(int, char *, char *);
  43. int detect_dcc_flood(time_t *, struct chat_info *, int);
  44. void identd_open();
  45. void identd_close();
  46. port_t listen_all(port_t, bool);
  47. bool valid_idx(int);
  48. extern int max_dcc;
  49. extern time_t connect_timeout;
  50. #endif /* !_DCCUTIL_H */