summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-03-31 14:30:42 -0400
committerC. McEnroe2020-03-31 14:30:42 -0400
commit25f419465f019feedb7266cb68232d1b32a66957 (patch)
tree67dffcc716ad457967f884cb25f448de27634f64 /chat.c
parentfcb6e2909f5211c24778741a2404b763914f9f99 (diff)
Add /ignore message filtering patterns
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/chat.c b/chat.c
index b7bf91b..8ead5da 100644
--- a/chat.c
+++ b/chat.c
@@ -127,7 +127,7 @@ int main(int argc, char *argv[]) {
 	const char *user = NULL;
 	const char *real = NULL;
 
-	const char *Opts = "!C:H:N:O:RS:a:c:eg:h:j:k:ln:p:r:s:u:vw:";
+	const char *Opts = "!C:H:N:O:RS:a:c:eg:h:i:j:k:ln:p:r:s:u:vw:";
 	const struct option LongOpts[] = {
 		{ "insecure", no_argument, NULL, '!' },
 		{ "copy", required_argument, NULL, 'C' },
@@ -140,6 +140,7 @@ int main(int argc, char *argv[]) {
 		{ "cert", required_argument, NULL, 'c' },
 		{ "sasl-external", no_argument, NULL, 'e' },
 		{ "host", required_argument, NULL, 'h' },
+		{ "ignore", required_argument, NULL, 'i' },
 		{ "join", required_argument, NULL, 'j' },
 		{ "priv", required_argument, NULL, 'k' },
 		{ "log", no_argument, NULL, 'l' },
@@ -168,6 +169,7 @@ int main(int argc, char *argv[]) {
 			break; case 'e': sasl = true;
 			break; case 'g': genCert(optarg);
 			break; case 'h': host = optarg;
+			break; case 'i': ignoreAdd(optarg);
 			break; case 'j': self.join = optarg;
 			break; case 'k': priv = optarg;
 			break; case 'l': logEnable = true;