This one's a bit tricky... I don't have access to theymos' code, so all I can really do is
guess at what the code might look like, and then patch the reconstruction.
My guess would be that the code in question is somewhere between one half and two thirds of the way into a function called
template_main() inside a file named
Display.template.php, and that it looks something like this:
if(!$context['user']['is_guest'] && !$message['member']['is_guest'])
echo '
<a href="', $scripturl, '?action=merit;msg=', $message['id'], '" target="_blank"><span style="vertical-align: middle;"><b>+Merit</b></span></a>';
Using that guess as a baseline, the patch would consist of extending that if-condition with
&& $message['member']['id'] != $context['user']['id'], like so:
if(!$context['user']['is_guest'] && !$message['member']['is_guest'] && $message['member']['id'] != $context['user']['id'])
echo '
<a href="', $scripturl, '?action=merit;msg=', $message['id'], '" target="_blank"><span style="vertical-align: middle;"><b>+Merit</b></span></a>';
(For everyone's info: I don't receive notifications when I'm mentioned. I'm working on adding a simple mention system to SMF, but, until then, there's no guarantee that I'll bump into every @PowerGlove. If you suspect I've slept on some important forum-improvement topic, feel free to shoot me a PM.) I only checked this afterwards, so I'll leave my original guesswork as-is, but, I see that the "+Merit" link does appear on guest posts, so whatever the actual if-condition is, it's missing the
&& !$message['member']['is_guest'] that I included in the guessed-at code. (I would add it, though: guest-meriting is similar to self-meriting; may as well just not emit links that can only error-out if you visit them.)