Explorar el Código

send irc messages by line by line

pull/3/head
anon hace 10 meses
padre
commit
29b96f58e4
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      src/irc.c

+ 5
- 1
src/irc.c Ver fichero

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