dccutil.h 1.5 KB

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