Fixed. Simple, I added Class=.* to the first if statment and now it dosn't do that. I also changed it so it uses a random number instead of the /watch?= like I wanted to do on edit 5.
@ Prolcons,
I did seperate signals so that its like the event that normaly triggers it.
All you have to do is change $Nick to %nick and $chan to %chan and your current script would work.