dccutil.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_DEBUG 0x7FF2
  18. #define DP_SERVER 0x7FF3
  19. #define DP_HELP 0x7FF4
  20. #define DP_STDERR 0x7FF5
  21. #define DP_MODE 0x7FF6
  22. #define DP_MODE_NEXT 0x7FF7
  23. #define DP_SERVER_NEXT 0x7FF8
  24. #define DP_HELP_NEXT 0x7FF9
  25. #define DP_DUMP 0x8000
  26. void init_dcc(void);
  27. void dumplots(int, const char *, char *);
  28. void dprintf(int, const char *, ...) __attribute__((format(printf, 2, 3)));
  29. void chatout(const char *, ...) __attribute__((format(printf, 1, 2)));
  30. void chanout_but(int, int, const char *, ...) __attribute__((format(printf, 3, 4)));
  31. void dcc_chatter(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(const char * = NULL, const char * = NULL);
  47. void identd_close();
  48. int listen_all(port_t, bool);
  49. bool valid_idx(int);
  50. int dcc_read(FILE *, bool);
  51. void dcc_write(FILE *, int);
  52. int check_cmd_pass(const char *, char *);
  53. int has_cmd_pass(const char *);
  54. void set_cmd_pass(char *, int);
  55. void cmdpass_free(struct cmd_pass *);
  56. extern int max_dcc;
  57. extern time_t connect_timeout;
  58. #endif /* !_DCCUTIL_H */