aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2026-07-20 03:50:17 -0500
committericeyrazor <iceyrazor@mailfence.com>2026-07-20 03:50:17 -0500
commitfa032cfb90c34dc929e38f6d0fc14c7f8521f307 (patch)
tree6f873a2eee883669cc7cbe3f2711beec69432ba3 /src
parent0ed6c602b14554a02f7782bd5e5635b1e9d9c195 (diff)
clear chat on terminate chat-loopHEADmain
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 57e3ced..1ce1e56 100644
--- a/src/main.c
+++ b/src/main.c
@@ -115,6 +115,14 @@ int main()
i = 0;
}
+ // remove till end if you dont care about sending a clear to chat box when stopping the program.
+
+ usleep(900000); // if 2 messages are sent to quickly. this one doesnt send. so this seems like a good delay on my machine. comment out if you dont care
+ int len = 0;
+ len = tosc_writeMessage(wbuffer, sizeof(wbuffer), "/chatbox/input", "sTF", "");
+ sendto(socketfd, wbuffer, len, MSG_CONFIRM, (const struct sockaddr*)&servaddr, sizeof(servaddr));
+ // end
+
free(comb_string);
free(dist);
free(song_title);