From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Sun, 19 Nov 2000 14:49:59 +0000 (+0000)
Subject: Exit process if on_public hook is activated under fork
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e25571487af448c9e38b71858995739d2aff88d1;p=infobot.git

Exit process if on_public hook is activated under fork


git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@159 c11ca15a-4712-0410-83d8-924469b57eb5
---

diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl
index b7126b4..af16d3e 100644
--- a/src/IRC/IrcHooks.pl
+++ b/src/IRC/IrcHooks.pl
@@ -579,6 +579,11 @@ sub on_public {
     $nuh     = $nick."!".$uh;
     ($user,$host) = split(/\@/, $uh);
 
+    if ($$ != $bot_pid) {
+	&ERROR("SHOULD NEVER HAPPEN.");
+	exit(0);
+    }
+
     ### DEBUGGING.
     if ($statcount < 200) {
 	foreach $chan (grep /[A-Z]/, keys %channels) {