Dave: If the code that you're trying to use is all on one line, like you posted, remove that code, then re-enter the code that I gave you one line at a time. Due to compatability problems, code copied from this forum does not copy inot internet explorer correctly, and when trying to copy it, one gets it all on one line, like you posted.
Also, I noticed in your reply that the bot's nick is [BBF]Guard, yet in the code it checks to see if the bot's nick is [BBD]Guard.
One thing I did forget about when writing the code is the fact that the # will translate into the name of the channel in the notice message. To get the # symbol showing replace it in the notice message with $chr(35)
Also, you might try putting the n switch into the $read command.