Avoid copying message to match if no ignores are set
parent
cb84983dd1
commit
d74ec7e0f3
1
ignore.c
1
ignore.c
|
@ -72,6 +72,7 @@ bool ignoreRemove(const char *pattern) {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Heat ignoreCheck(enum Heat heat, uint id, const struct Message *msg) {
|
enum Heat ignoreCheck(enum Heat heat, uint id, const struct Message *msg) {
|
||||||
|
if (!ignore.len) return heat;
|
||||||
char match[512];
|
char match[512];
|
||||||
snprintf(
|
snprintf(
|
||||||
match, sizeof(match), "%s!%s@%s %s %s %s",
|
match, sizeof(match), "%s!%s@%s %s %s %s",
|
||||||
|
|
Loading…
Reference in New Issue