I want to edit the code if possible. Where can I find it?
Templates > *Your Theme* > Global Templates > global_pm_alert
You may need to edit the language files as well.
But that doesn't have the actual code for the links produced does it? I found the dismiss code in a .js file but I can't find the code for the link produced.

It's in global.php, find around line 426:
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");
The code for the links are just above it...