Don't know if it will block a virus, but should stop you from seeing as many spam messages:
on *:text:*:?:{
if (http isin $1-) { close -cfims $nick | msg $nick your msgs are blocked due to your posting a URL to me }
if (sex isin $1-) { close -cfims $nick | msg $nick your msgs are blocked due to your posting a URL to me }
.ignore -u15pntid $nick
}
Note: I didn't have a chance to test this.