summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-31 14:30:42 -0400
committerJune McEnroe <june@causal.agency>2020-03-31 14:30:42 -0400
commit25f419465f019feedb7266cb68232d1b32a66957 (patch)
tree67dffcc716ad457967f884cb25f448de27634f64 /chat.h
parentSave and load buffer line heat (diff)
downloadcatgirl-25f419465f019feedb7266cb68232d1b32a66957.tar.gz
catgirl-25f419465f019feedb7266cb68232d1b32a66957.zip
Add /ignore message filtering patterns
Diffstat (limited to '')
-rw-r--r--chat.h11
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)));