misc.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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:%S]"
  10. // Define this to be the length of the entire timestamp after replacing vars
  11. #define LOG_TS_LEN 10
  12. void restart(int);
  13. int coloridx(int);
  14. const char *color(int, int, int);
  15. void shuffle(char *, char *, size_t);
  16. void shuffleArray(char **, size_t);
  17. void showhelp(int, struct flag_record *, const char *);
  18. char *replace(const char *, const char *, const char *);
  19. char *replace_vars(char*);
  20. int goodpass(char *, int, char *);
  21. int bot_aggressive_to(struct userrec *);
  22. void readsocks(const char *);
  23. int updatebin(int, char *, int);
  24. size_t my_strcpy(char *, const char *);
  25. void maskhost(const char *, char *);
  26. char *stristr(char *, char *);
  27. void splitc(char *, char *, char);
  28. void splitcn(char *, char *, char, size_t);
  29. int remove_crlf(char *);
  30. int remove_crlf_r(char *);
  31. char *newsplit(char **);
  32. char *splitnick(char **);
  33. void stridx(char *, char *, int);
  34. void daysago(time_t, time_t, char *, size_t);
  35. void days(time_t, time_t, char *, size_t);
  36. void daysdur(time_t, time_t, char *, size_t);
  37. void show_motd(int);
  38. void show_channels(int, char *);
  39. void show_banner(int);
  40. void make_rand_str(char *, size_t, bool = 1);
  41. char *str_escape(const char *, const char, const char);
  42. char *strchr_unescape(char *, const char, register const char);
  43. void str_unescape(char *, register const char);
  44. int str_isdigit(const char *);
  45. void kill_bot(char *, char *);
  46. char *strtolower(char *);
  47. char *strtoupper(char *);
  48. char *step_thru_file(FILE *);
  49. char *trim(char *);
  50. int skipline(char *, int *);
  51. extern int server_lag;
  52. extern bool use_invites, use_exempts;
  53. #endif /* !_MISC_H_ */