Thats all well and good, but what your code is doing is watching for notices from YOURSELF... what possible purpose would you have for /notice ing yourself?
Change the $me to the nick that would actually be sending you the notices?
Edit ::
Ok, so i didn't read the follow up posts properly... n/m me

But as said, for that purpose notices probably isn't the best thing to use, however i dont see any reason why NONE of your code is working, unless you have another on notice event in the same script file...