diff options
author | C. McEnroe | 2020-03-31 14:30:42 -0400 |
---|---|---|
committer | C. McEnroe | 2020-03-31 14:30:42 -0400 |
commit | 25f419465f019feedb7266cb68232d1b32a66957 (patch) | |
tree | 67dffcc716ad457967f884cb25f448de27634f64 /chat.h | |
parent | fcb6e2909f5211c24778741a2404b763914f9f99 (diff) |
Add /ignore message filtering patterns
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chat.h b/chat.h index 545be03..7bcac3b 100644 --- a/chat.h +++ b/chat.h @@ -200,7 +200,7 @@ const char *commandIsNotice(uint id, const char *input); const char *commandIsAction(uint id, const char *input); void commandCompleteAdd(void); -enum Heat { Cold, Warm, Hot }; +enum Heat { Ice, Cold, Warm, Hot }; extern struct Util uiNotifyUtil; void uiInit(void); void uiShow(void); @@ -261,6 +261,15 @@ void urlOpenCount(uint id, uint count); void urlOpenMatch(uint id, const char *str); void urlCopyMatch(uint id, const char *str); +enum { IgnoreCap = 256 }; +extern struct Ignore { + size_t len; + char *patterns[IgnoreCap]; +} ignore; +const char *ignoreAdd(const char *pattern); +bool ignoreRemove(const char *pattern); +enum Heat ignoreCheck(enum Heat heat, const struct Message *msg); + extern bool logEnable; void logFormat(uint id, const time_t *time, const char *format, ...) __attribute__((format(printf, 3, 4))); |