Some more logic fixed

Okay BUFSIZE = 1024 then we have
ircsnprintf(modebuf, sizeof(modebuf), "%c", *modes);
hmmm think we can get away with a slightly smaller buffer size..

Then you got newav[127]; when we use only 4 slots.. again smaller size

This was back ported already