ok if i understand what you want correctly try replacing the $chan in whichever of the above scripts you are using with the actuall word channel .