summary refs log tree commit diff
path: root/litterbox.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--litterbox.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/litterbox.c b/litterbox.c
index 5924680..9cc1bb5 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -360,12 +360,14 @@ static void handlePrivmsg(struct Message *msg) {
 		type = Action;
 	}
 
+	bool selfMessage = !strcmp(msg->nick, msg->params[0]);
 	if (query && searchQuery && type == Privmsg) {
-		if (searchQuery == Public || !strcmp(msg->nick, msg->params[0])) {
+		if (searchQuery == Public || selfMessage) {
 			querySearch(msg);
 			return;
 		}
 	}
+	if (selfMessage) return;
 
 	insertContext(context, query);
 	insertName(msg);