From 29b96f58e47c1af54b54028d1439a30ee237a00d Mon Sep 17 00:00:00 2001 From: anon Date: Thu, 3 Aug 2023 13:09:47 +0200 Subject: [PATCH] send irc messages by line by line --- src/irc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/irc.c b/src/irc.c index 807138c..1817712 100644 --- a/src/irc.c +++ b/src/irc.c @@ -63,7 +63,11 @@ ircmsg(const char* fmt, { exit(1); } puts(fmtdmsg); - IRCMSG(fmtdmsg); // TODO: make it send the message line by line + const char* delim = "\n"; + char* data = strtok(fmtdmsg, delim); + do{ + IRCMSG(data); + }while((data = strtok(NULL, delim), data)); free(fmtdmsg); va_end(args);