The script above will only work with provate messages. Assuming that someone sends you the word *sending*, it can also be on regualr text, and I assume that it can also be on notices. If you search for sending because someone sends you a file (And writes "Sending you file faq.txt ....") then you should look for notices.
You can also listen to ctcp sebd event which is catched when someone sends you a file.
ON 1:TEXT:*Sending*:*:/showmirc -r
on 1:NOTICE:*Sending*:?:/showmirc -r