At trying my suggestion, did you
- put a file "forbiddenurls.txt" in the main directory of the mIRC serving as your bot ( //echo -a $mircdir in the bot client)
- add url entries to this file as described: without http or www or the like
- replace "#YOURCHAN" in the code (2 instances) with the actual channel name or channel names
- make sure the bot running the script was @ in this channel
?