summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-27 02:07:40 -0500
committerJune McEnroe <june@causal.agency>2020-02-27 02:07:40 -0500
commit0e519adaadf43bac33ac6caf3d37aed580724ea6 (patch)
tree1c3750f1ecb3cce5d12c978ad8a27f98ed1b963b /client.c
parentSupport setname (diff)
downloadpounce-0e519adaadf43bac33ac6caf3d37aed580724ea6.tar.gz
pounce-0e519adaadf43bac33ac6caf3d37aed580724ea6.zip
Support cap-notify
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/client.c b/client.c
index c472f51..2d5b8e0 100644
--- a/client.c
+++ b/client.c
@@ -421,6 +421,13 @@ static const char *filterBatch(const char *line) {
 	return (wordcmp(line, 0, "BATCH") ? line : NULL);
 }
 
+static const char *filterCapNotify(const char *line) {
+	if (wordcmp(line, 0, "CAP")) return line;
+	if (!wordcmp(line, 1, "NEW")) return NULL;
+	if (!wordcmp(line, 1, "DEL")) return NULL;
+	return line;
+}
+
 static const char *filterChghost(const char *line) {
 	return (wordcmp(line, 0, "CHGHOST") ? line : NULL);
 }
@@ -488,6 +495,7 @@ static Filter *Filters[] = {
 	[CapAccountNotifyBit] = filterAccountNotify,
 	[CapAwayNotifyBit] = filterAwayNotify,
 	[CapBatchBit] = filterBatch,
+	[CapCapNotifyBit] = filterCapNotify,
 	[CapChghostBit] = filterChghost,
 	[CapExtendedJoinBit] = filterExtendedJoin,
 	[CapInviteNotifyBit] = filterInviteNotify,
/td>Implement service statusJune McEnroe 2020-08-15Parse control commandsJune McEnroe 2020-08-15Read service pipesJune McEnroe 2020-08-15Implement non-blocking line-buffered readingJune McEnroe 2020-08-15Generate tags fileJune McEnroe 2020-08-15Just use CLOCK_MONOTONIC and clean up includesJune McEnroe 2020-08-15Reap childrenJune McEnroe 2020-08-14Implement serviceSignal, serviceStop, serviceRestartJune McEnroe 2020-08-14Reset restartInterval and restartDeadline on startJune McEnroe 2020-08-14Switch to timespec for timeoutsJune McEnroe 2020-08-14Implement serviceStartJune McEnroe 2020-08-14Flesh out Service structJune McEnroe 2020-08-14Build environment for servicesJune McEnroe 2020-08-14Implement spawntab parsingJune McEnroe 2020-08-14Open syslog, daemonize, write PIDJune McEnroe 2020-08-14Implement user and group lookupJune McEnroe 2020-08-14Add install targetJune McEnroe 2020-08-14Add spawnd skeletonJune McEnroe