]> git.donarmstrong.com Git - infobot.git/commitdiff
if statement of seen swapped. DCC CHAT close ignored if forked.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 20 Aug 2000 13:28:11 +0000 (13:28 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 20 Aug 2000 13:28:11 +0000 (13:28 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@51 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/IrcHooks.pl

index d7b46fc0d8b408acfa04220fb3fb7be4463f3ff1..bd6fa69b839092ad24663e99907d8267ab60123c 100644 (file)
@@ -166,6 +166,9 @@ sub on_dcc_close {
     my $nick = $event->nick();
     my $sock = ($event->to)[0];
 
+    # DCC CHAT close on fork exit workaround.
+    return if ($bot_pid != $$);
+
     &DEBUG("dcc_close: nick => '$nick'.");
 
     if (exists $dcc{'SEND'}{$nick} and -f "temp/$nick.txt") {
@@ -894,9 +897,9 @@ sub hookMsg {
        &status("[$orig{who}] $orig{message}");
     }
 
-    if ((&IsParam("seenStoreAll") or !$skipmessage) and
+    if ((!$skipmessage or &IsParam("seenStoreAll")) and
        &IsParam("seen") and
-       $msgType =~ /public/ and
+       $msgType =~ /public/
     ) {
        $seencache{$who}{'time'} = time();
        $seencache{$who}{'nick'} = $orig{who};