Let me get this straight, you want to know how to solve a problem, that you cant even reproduce, that may have existed in a previous version of mirc as yet undefined. Which may or maynot have had anything to do with you joining a channel, or your friends script.
Well yeeehaaa im going to fall back on old and simple logic, Arcoms razor (sp?) all things being equal the simplest solution is normally the correct one. And ill say it was human error, you likley did it to yourself.