misc.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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(void);
  11. void restart(int) __attribute__((noreturn));
  12. int coloridx(int);
  13. const char *color(int, int, int);
  14. void shuffle(char *, char *);
  15. void shuffleArray(char **, size_t);
  16. void showhelp(int, struct flag_record *, char *);
  17. char *replace(const char *, const char *, const char *);
  18. int goodpass(char *, int, char *);
  19. int bot_aggressive_to(struct userrec *);
  20. int updatebin(int, char *, int);
  21. size_t my_strcpy(char *, char *);
  22. void maskhost(const char *, char *);
  23. char *stristr(char *, char *);
  24. void splitc(char *, char *, char);
  25. void splitcn(char *, char *, char, size_t);
  26. void remove_crlf(char *);
  27. char *newsplit(char **);
  28. char *splitnick(char **);
  29. void stridx(char *, char *, int);
  30. void dumplots(int, const char *, char *);
  31. void daysago(time_t, time_t, char *);
  32. void days(time_t, time_t, char *);
  33. void daysdur(time_t, time_t, char *);
  34. void show_motd(int);
  35. void show_channels(int, char *);
  36. void show_banner(int);
  37. void make_rand_str(char *, size_t);
  38. char *str_escape(const char *, const char, const char);
  39. char *strchr_unescape(char *, const char, register const char);
  40. void str_unescape(char *, register const char);
  41. int str_isdigit(const char *);
  42. void kill_bot(char *, char *);
  43. char *strtolower(char *);
  44. char *strtoupper(char *);
  45. char *step_thru_file(FILE *);
  46. char *trim(char *);
  47. int skipline(char *, int *);
  48. bool check_master(const char *);
  49. bool check_master_hash(const char *, const char *);
  50. extern int server_lag;
  51. extern bool use_invites, use_exempts;
  52. #endif /* !_MISC_H_ */