Well, since noone answered, I thought I just do. I don't want to only tell you to see the
Modifying UnrealIRCd topic, I'll give you some hints.
First of all, my activeusers module was designed for very an other purpose, it's useless for your problem.
Second, before doing such things like using lynx in UnrealIRCd, ask the question to yourself whether you do them in the right way. As you probably know, lynx is a user-interactive web browser program, while UnrealIRCd is a daemon. If you know and understand the differences between them, you can immediately see the reason why it would be a bad idea to do that exec() thing in UnrealIRCd. (By the way, I've yet to see an exec() function in the C language.)
Maybe it's a better way to handle the HTTP connection directly by the IRC server software. Because starting a HTTP connection can result in a timeout, you'd better handle the connection asynchronously, so the IRC clients will not experience a huge lag while they are on your server.
Obviously, this also requires more knowledge of course, I just want to point you out how much the problem is difficult. And what I said here are only my ideas, there can be other solutions too. For instance, your job would be much simpler if you could find a statistics server program or something else that could do this for you. Previously I used the Thales IRC to SQL gateway software and worked well. It's available at
http://www.gnu.org/software/thales/.
I hope I could somewhat help you.