summary refs log tree commit diff
path: root/contrib/palaver/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/palaver/notify.c')
-rw-r--r--contrib/palaver/notify.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/palaver/notify.c b/contrib/palaver/notify.c
index 7d3be5f..67d416c 100644
--- a/contrib/palaver/notify.c
+++ b/contrib/palaver/notify.c
@@ -283,6 +283,8 @@ static void handleReplyUserHost(struct Message *msg) {
 	}
 }
 
+static bool sensitive;
+
 static void keyword(sqlite3_context *ctx, int n, sqlite3_value *args[]) {
 	assert(n == 2);
 	const char *haystack = (const char *)sqlite3_value_text(args[0]);
@@ -311,7 +313,7 @@ static void keyword(sqlite3_context *ctx, int n, sqlite3_value *args[]) {
 	size_t len = strlen(needle);
 	const char *match = haystack;
 	sqlite3_result_int(ctx, false);
-	while (NULL != (match = strcasestr(match, needle))) {
+	while (NULL != (match = (sensitive ? strstr : strcasestr)(match, needle))) {
 		char a = (match > haystack ? match[-1] : ' ');
 		char b = (match[len] ? match[len] : ' ');
 		if (b == '\1') b = ' ';
@@ -693,7 +695,7 @@ int main(int argc, char *argv[]) {
 	const char *pass = NULL;
 	const char *user = "pounce-palaver";
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "!NPc:d:k:p:u:vw:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "!NPc:d:k:p:su:vw:"));) {
 		switch (opt) {
 			break; case '!': insecure = true;
 			break; case 'N': noPreview = true;
@@ -702,6 +704,7 @@ int main(int argc, char *argv[]) {
 			break; case 'd': path = optarg;
 			break; case 'k': priv = optarg;
 			break; case 'p': port = optarg;
+			break; case 's': sensitive = true;
 			break; case 'u': user = optarg;
 			break; case 'v': verbose = true;
 			break; case 'w': pass = optarg;
86b&follow=1'>Add /znc commandJune McEnroe Only because ZNC tells you to use it and expects it to work. 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe It's actually in a good state now, I think. 2019-02-21Replace "view" with "window"June McEnroe I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy. 2019-02-21Remove ROT13June McEnroe It's just not convenient when it can only do the whole line... 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe Otherwise the "Traveling" message isn't visible while connecting. 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe