summary refs log tree commit diff
path: root/.gitignore
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2026-02-13 12:17:02 +0300
committerNakidai <nakidai@disroot.org>2026-02-14 00:20:38 +0300
commit15151c88a7eb381fb5b46daaf521fc609d40539c (patch)
treeaa2991b21156e10477649a436f81f530d750d953 /.gitignore
parent3e58f0366205de63b10e9379c9b738dd80664fde (diff)
downloadlibreircd-15151c88a7eb381fb5b46daaf521fc609d40539c.tar.gz
libreircd-15151c88a7eb381fb5b46daaf521fc609d40539c.zip
Fix & Refactor NAMES
When generating a string to respond, there's a condition to either put
a space and continue or the send string and start collecting again. If
after the loop send buffer is non-empty, it should be sent as well.

But there's an issue: that last line after the loop contains a trailing
whitespace. So some clients can put a comma to the end and some bots
probably can even break because of that.

One solution is to simply buf[strlen(buf)-1]=0; but this doesn't feel
right. My solution is to add a check to the condition in loop whether
this iteration is last. If so - print. By the way this eliminates the
need in post-loop condition reducing reply(353) duplication
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions