summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-15 13:31:53 +0200
committerdefault <nobody@localhost>2024-05-15 13:31:53 +0200
commit0a6df8e504569be4caf39930c473f12b328e5b2a (patch)
treeca0dd5767719d5b96f73b77d42b8da69e0a32a7d /data.c
parent0a6cfba399cbd7510b6ffa9ddfde5a8ca31c4828 (diff)
Renamed content_check() to content_match().
Diffstat (limited to 'data.c')
-rw-r--r--data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/data.c b/data.c
index 61045c6..5abbeaf 100644
--- a/data.c
+++ b/data.c
@@ -2272,7 +2272,7 @@ int instance_unblock(const char *instance)
/** operations by content **/
-int content_check(const char *file, const xs_dict *msg)
+int content_match(const char *file, const xs_dict *msg)
/* checks if a message's content matches any of the regexes in file */
/* file format: one regex per line */
{
@@ -2283,7 +2283,7 @@ int content_check(const char *file, const xs_dict *msg)
if (xs_type(v) == XSTYPE_STRING && *v) {
if ((f = fopen(fn, "r")) != NULL) {
- srv_debug(1, xs_fmt("content_check: loading regexes from %s", fn));
+ srv_debug(1, xs_fmt("content_match: loading regexes from %s", fn));
/* massage content (strip HTML tags, etc.) */
xs *c = xs_regex_replace(v, "<[^>]+>", " ");
@@ -2294,7 +2294,7 @@ int content_check(const char *file, const xs_dict *msg)
xs *rx = xs_strip_i(xs_readline(f));
if (*rx && xs_regex_match(c, rx)) {
- srv_debug(1, xs_fmt("content_check: match for '%s'", rx));
+ srv_debug(1, xs_fmt("content_match: match for '%s'", rx));
r = 1;
}
}