Preventing Zombie Pc's

Ok, i was wondering people can use IRC to send thousands of packets to a web server, which would in turn slow it down. I was wondering how do your prevent this from happeneing?