summary refs log tree commit diff
path: root/ignore.c
diff options
context:
space:
mode:
Diffstat (limited to 'ignore.c')
-rw-r--r--ignore.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ignore.c b/ignore.c
index 29a681e..f91b089 100644
--- a/ignore.c
+++ b/ignore.c
@@ -46,10 +46,12 @@ const char *ignoreAdd(const char *pattern) {
 	}
 	char **dest = &ignore.patterns[ignore.len++];
 	if (!ex && !sp) {
-		asprintf(dest, "%s!*@* * *", pattern);
+		asprintf(dest, "%s!*@* * * *", pattern);
 	} else if (sp < 1) {
-		asprintf(dest, "%s * *", pattern);
+		asprintf(dest, "%s * * *", pattern);
 	} else if (sp < 2) {
+		asprintf(dest, "%s * *", pattern);
+	} else if (sp < 3) {
 		asprintf(dest, "%s *", pattern);
 	} else {
 		*dest = strdup(pattern);
@@ -72,8 +74,9 @@ bool ignoreRemove(const char *pattern) {
 enum Heat ignoreCheck(enum Heat heat, uint id, const struct Message *msg) {
 	char match[512];
 	snprintf(
-		match, sizeof(match), "%s!%s@%s %s %s",
-		msg->nick, msg->user, msg->host, msg->cmd, idNames[id]
+		match, sizeof(match), "%s!%s@%s %s %s %s",
+		msg->nick, msg->user, msg->host,
+		msg->cmd, idNames[id], (msg->params[1] ?: "")
 	);
 	for (size_t i = 0; i < ignore.len; ++i) {
 		if (fnmatch(ignore.patterns[i], match, FNM_CASEFOLD)) continue;
mit/server.c?h=1.4p1&id=f69cb8296624e8e2c495001ab0c7d38839ad9704&follow=1'>Implement ringWriteJune McEnroe 2019-10-24Make clientFormat publicJune McEnroe 2019-10-24Make serverFormat publicJune McEnroe 2019-10-24Rename some thingsJune McEnroe 2019-10-23Add ISUPPORT draft to STANDARDSJune McEnroe 2019-10-23Track own originJune McEnroe 2019-10-23Track channels and sync ISUPPORTJune McEnroe 2019-10-23Track nick changesJune McEnroe 2019-10-23Rename Command to MessageJune McEnroe 2019-10-23Synchronize state after client registrationJune McEnroe 2019-10-23Send to server if client has no needsJune McEnroe 2019-10-23Implement some amount of client connectionJune McEnroe 2019-10-23Set clients non-blockingJune McEnroe 2019-10-23Clean up state.c and factor out parsingJune McEnroe 2019-10-23Respond to pingsJune McEnroe 2019-10-23Add verbose flagJune McEnroe 2019-10-23Set NOSIGPIPE on server connectionJune McEnroe 2019-10-23Set an initial loop capJune McEnroe 2019-10-23Fix rest parsingJune McEnroe 2019-10-23Add dynamic poll listJune McEnroe 2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe 2019-10-23Clean up state somewhatJune McEnroe 2019-10-23Actually send the buffer...June McEnroe 2019-10-23Add stateJune McEnroe