Compare commits

...

3 Commits

Author SHA1 Message Date
29b96f58e4 send irc messages by line by line 2023-08-03 13:09:47 +02:00
d10cb36a4b fuck optimization 2023-08-03 13:09:22 +02:00
32d27a182f stop shitting up chad 2023-08-03 12:57:41 +02:00
3 changed files with 7 additions and 3 deletions

View File

@ -11,4 +11,4 @@ probotic: $(SRC) $(HDR)
$(SRC) $(HDR):
run:
./probotic -server irc.rizon.net -port 6667 -username probotic -channel '#/g/chad'
./probotic -server irc.rizon.net -port 6667 -username probotic -channel '#stop_shitting_up_chad'

View File

@ -17,7 +17,7 @@ mkdir -p $PREFIX && echo "Made directory: $PREFIX"
# Bourne shell is evil
if [ ${DEBUG-0} -eq 1 ]
then
CFLAGS=`echo "${CFLAGS} -Og -ggdb"`
CFLAGS=`echo "${CFLAGS} -O0 -ggdb"`
else
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
CFLAGS=`echo "${CFLAGS} -O2 -flto=auto -fomit-frame-pointer -s"`

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