Closed darkshade9 closed 2 years ago
Thanks for the fix! I guess the IRC code doesn't get used much for this go to unnoticed for so long.
I was curious how this happened, so I tracked it down to this (very sensible) change made 13 years ago in Maniac's M0.22 code: https://github.com/Raptor007/aq2-tng/blame/12911f8950a736217b2bc00f3b32e2765c7b5f46/source/a_match.c#L271
Aside from crashing on %i (which really a function named "printf" should be able to parse) it was much cleaner than the old code: https://github.com/Raptor007/aq2-tng/blame/484e5b2ba154eed2deb83623e20a005a4ba89f42/source/a_match.c#L270-L283
Ideally the IRC_printf
function should be able to parse some basics like %i/%f or even better use something like vsprintf
in the default
case, but it's probably not worth the effort.
IRC_printf would segfault if ircbot=1 and connected to an IRC server because it doesn't use %i (see https://github.com/Raptor007/aq2-tng/blob/master/source/tng_irc.c#L482-L491), suggested change to %k