send irc messages by line by line

This commit is contained in:
anon 2023-08-03 13:09:47 +02:00
parent d10cb36a4b
commit 29b96f58e4

View File

@ -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);