summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-07 20:57:36 -0500
committerJune McEnroe <june@causal.agency>2019-12-07 20:57:36 -0500
commit959b34db025d49a523913d8b45275286691169d1 (patch)
tree9c18ed9197643fc289185ce415c00af7d3ace0fa
parentUse named parameters in unscoop matchers (diff)
downloadlitterbox-959b34db025d49a523913d8b45275286691169d1.tar.gz
litterbox-959b34db025d49a523913d8b45275286691169d1.zip
Stop after the first matcher to match
Diffstat (limited to '')
-rw-r--r--unscoop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/unscoop.c b/unscoop.c
index 782ce7f..6d757a8 100644
--- a/unscoop.c
+++ b/unscoop.c
@@ -201,6 +201,8 @@ static void matchLine(
 		int error = regexec(&regex[i], line, ParamCap, match, 0);
 		if (error) continue;
 
+		sqlite3_reset(insertName);
+		sqlite3_reset(insertEvent);
 		sqlite3_clear_bindings(insertName);
 		sqlite3_clear_bindings(insertEvent);
 
@@ -219,8 +221,7 @@ static void matchLine(
 
 		dbStep(insertName);
 		dbStep(insertEvent);
-		sqlite3_reset(insertName);
-		sqlite3_reset(insertEvent);
+		break;
 	}
 }
 
insert color codes for non-mentionsJune McEnroe 2020-02-11Take first two words in colorMentionsJune McEnroe 2020-02-11Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe