misc.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _MISC_H
  2. #define _MISC_H
  3. #include "common.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. char *wbanner();
  11. void restart(int) __attribute__((noreturn));
  12. int coloridx(int);
  13. char *color(int, int, int);
  14. void shuffle(char *, char *);
  15. void showhelp(int, struct flag_record *, char *);
  16. int listen_all(int, int);
  17. char *replace(const char *, const char *, const char *);
  18. int goodpass(char *, int, char *);
  19. void makeplaincookie(char *, char *, char *);
  20. int bot_aggressive_to(struct userrec *);
  21. int updatebin(int, char *, int);
  22. int egg_strcatn(char *dst, const char *src, size_t max);
  23. int my_strcpy(char *, char *);
  24. void maskhost(const char *, char *);
  25. char *stristr(char *, char *);
  26. void splitc(char *, char *, char);
  27. void splitcn(char *, char *, char, size_t);
  28. void remove_crlf(char *);
  29. char *newsplit(char **);
  30. char *splitnick(char **);
  31. void stridx(char *, char *, int);
  32. void dumplots(int, const char *, char *);
  33. void daysago(time_t, time_t, char *);
  34. void days(time_t, time_t, char *);
  35. void daysdur(time_t, time_t, char *);
  36. void show_motd(int);
  37. void show_channels(int, char *);
  38. void show_banner(int);
  39. void make_rand_str(char *, int);
  40. char *str_escape(const char *, const char, const char);
  41. char *strchr_unescape(char *, const char, register const char);
  42. inline void str_unescape(char *, register const char);
  43. int str_isdigit(const char *);
  44. void kill_bot(char *, char *);
  45. extern int server_lag, use_invites, use_exempts;
  46. #endif /* !_MISC_H_ */