summary refs log tree commit diff
path: root/ignore.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
commit75a6aa9258270169f43f56e063f1bfb57eebe56b (patch)
tree7db2ed9792116bf47541a02829d00da2adccb2ef /ignore.c
parentOnly treat /open param as count if single digit (diff)
downloadcatgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.tar.gz
catgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.zip
Use gnu-case-range and gnu-conditional-omitted-operand extensions
I'm sad to do this but I just can't stand writing (foo ? foo : bar)
anymore.
Diffstat (limited to '')
-rw-r--r--ignore.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ignore.c b/ignore.c
index 5c14b7d..d65c35a 100644
--- a/ignore.c
+++ b/ignore.c
@@ -62,8 +62,7 @@ enum Heat ignoreCheck(enum Heat heat, const struct Message *msg) {
 	char match[512];
 	snprintf(
 		match, sizeof(match), "%s!%s@%s %s %s",
-		msg->nick, msg->user, msg->host, msg->cmd,
-		(msg->params[0] ? msg->params[0] : "")
+		msg->nick, msg->user, msg->host, msg->cmd, (msg->params[0] ?: "")
 	);
 	for (size_t i = 0; i < ignore.len; ++i) {
 		if (fnmatch(ignore.patterns[i], match, FNM_CASEFOLD)) continue;