misc.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #ifndef _MISC_H
  2. #define _MISC_H
  3. #include "eggmain.h"
  4. /*
  5. * Set the following to the timestamp for the logfile entries.
  6. * Popular times might be "[%H:%M]" (hour, min), or "[%H:%M:%S]" (hour, min, sec)
  7. * Read `man strftime' for more formatting options. Keep it below 32 chars.
  8. */
  9. #define LOG_TS "[%H:%M]"
  10. #define KICK_BANNED 1
  11. #define KICK_KUSER 2
  12. #define KICK_KICKBAN 3
  13. #define KICK_MASSDEOP 4
  14. #define KICK_BADOP 5
  15. #define KICK_BADOPPED 6
  16. #define KICK_MANUALOP 7
  17. #define KICK_MANUALOPPED 8
  18. #define KICK_CLOSED 9
  19. #define KICK_FLOOD 10
  20. #define KICK_NICKFLOOD 11
  21. #define KICK_KICKFLOOD 12
  22. #define KICK_BOGUSUSERNAME 13
  23. #define KICK_MEAN 14
  24. #define KICK_BOGUSKEY 15
  25. #define ERR_BINSTAT 1
  26. #define ERR_BINMOD 2
  27. #define ERR_PASSWD 3
  28. #define ERR_WRONGBINDIR 4
  29. #define ERR_CONFSTAT 5
  30. #define ERR_TMPSTAT 6
  31. #define ERR_CONFDIRMOD 7
  32. #define ERR_CONFMOD 8
  33. #define ERR_TMPMOD 9
  34. #define ERR_NOCONF 10
  35. #define ERR_CONFBADENC 11
  36. #define ERR_WRONGUID 12
  37. #define ERR_WRONGUNAME 13
  38. #define ERR_BADCONF 14
  39. #define ERR_MAX 15
  40. #define EMAIL_OWNERS 0x1
  41. #define EMAIL_TEAM 0x2
  42. #define DETECT_LOGIN 1
  43. #define DETECT_TRACE 2
  44. #define DETECT_PROMISC 3
  45. #define DETECT_PROCESS 4
  46. #define DETECT_SIGCONT 5
  47. #define DET_IGNORE 0
  48. #define DET_WARN 1
  49. #define DET_REJECT 2
  50. #define DET_DIE 3
  51. #define DET_SUICIDE 4
  52. #ifndef MAKING_MODS
  53. char *homedir();
  54. char *my_uname();
  55. char *confdir();
  56. void baduname(char *, char *);
  57. int email(char *, char *, int);
  58. char *color(int, int, int);
  59. void shuffle(char *, char *);
  60. void showhelp(int, struct flag_record *, char *);
  61. char *btoh(const unsigned char *, int);
  62. void local_check_should_lock();
  63. void werr(int);
  64. char *werr_tostr(int);
  65. int listen_all(int, int);
  66. char *getfullbinname(char *);
  67. char *replace(char *, char *, char *);
  68. void detected(int, char *);
  69. int goodpass(char *, int, char *);
  70. void check_last();
  71. void check_promisc();
  72. void check_trace();
  73. void check_processes();
  74. void makeplaincookie(char *, char *, char *);
  75. int isupdatehub();
  76. int getting_users();
  77. char *kickreason(int);
  78. int bot_aggressive_to(struct userrec *);
  79. int updatebin(int, char *, int);
  80. int shell_exec(char * cmdline, char * input, char ** output, char ** erroutput);
  81. int egg_strcatn(char *dst, const char *src, size_t max);
  82. int my_strcpy(char *, char *);
  83. void putlog (int, char *, char *, ...);
  84. int ischanhub();
  85. int dovoice(struct chanset_t *);
  86. int dolimit(struct chanset_t *);
  87. void maskhost(const char *, char *);
  88. char *stristr(char *, char *);
  89. void splitc(char *, char *, char);
  90. void splitcn(char *, char *, char, size_t);
  91. void remove_crlf(char **);
  92. char *newsplit(char **);
  93. char *splitnick(char **);
  94. void stridx(char *, char *, int);
  95. void dumplots(int, const char *, char *);
  96. void daysago(time_t, time_t, char *);
  97. void days(time_t, time_t, char *);
  98. void daysdur(time_t, time_t, char *);
  99. void show_motd(int);
  100. void show_channels(int, char *);
  101. void show_banner(int);
  102. char *extracthostname(char *);
  103. void make_rand_str(char *, int);
  104. int oatoi(const char *);
  105. char *str_escape(const char *, const char, const char);
  106. char *strchr_unescape(char *, const char, register const char);
  107. void str_unescape(char *, register const char);
  108. int str_isdigit(const char *);
  109. void kill_bot(char *, char *);
  110. #endif /* !MAKING_MODS */
  111. #endif /* !_MISC_H_ */