I can reduce the code to around 50 lines if I strip out all the comments and stack related code onto the same line. This code was intentionally written for learning.
The code is in fact very simple, while also being very considerate of preventing run-away flooding since there is a lot of server-demand on requesting this information when joined to many channels. Can't just ask for it all at once or you'll be disconnected.
Edit: I just uploaded a condensed version for you.r_ialfill_auto_tiny.mrc