]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/Schedulers.pl
- berkeley dbm support now works! thanks to tim riker.
[infobot.git] / src / IRC / Schedulers.pl
index 22742476350e34186877c3375e65370adc7772c7..7ce4284153c4aef3c72ae42501dc194cdfe3d029 100644 (file)
@@ -875,49 +875,6 @@ sub miscCheck2 {
     closedir DIR;
 }
 
-sub shmFlush {
-    return if ($$ != $::bot_pid); # fork protection.
-
-    if (@_) {
-       &ScheduleThis(5, "shmFlush");
-       return if ($_[0] eq "2");
-    }
-
-    my $time;
-    my $shmmsg = &shmRead($shm);
-    $shmmsg =~ s/\0//g;         # remove padded \0's.
-    if ($shmmsg =~ s/^(\d+): //) {
-       $time   = $1;
-    }
-
-    foreach (split '\|\|', $shmmsg) {
-       next if (/^$/);
-       &VERB("shm: Processing '$_'.",2);
-
-       if (/^DCC SEND (\S+) (\S+)$/) {
-           my ($nick,$file) = ($1,$2);
-           if (exists $dcc{'SEND'}{$who}) {
-               &msg($nick, "DCC already active.");
-           } else {
-               &DEBUG("shm: dcc sending $2 to $1.");
-               $conn->new_send($1,$2);
-               $dcc{'SEND'}{$who} = time();
-           }
-       } elsif (/^SET FORKPID (\S+) (\S+)/) {
-           $forked{$1}{PID} = $2;
-       } elsif (/^DELETE FORK (\S+)$/) {
-           delete $forked{$1};
-       } elsif (/^EVAL (.*)$/) {
-           &DEBUG("evaling '$1'.");
-           eval $1;
-       } else {
-           &DEBUG("shm: unknown msg. ($_)");
-       }
-    }
-
-    &shmWrite($shm,"") if ($shmmsg ne "");
-}
-
 ### this is semi-scheduled
 sub getNickInUse {
     if ($ident eq $param{'ircNick'}) {
@@ -1176,30 +1133,6 @@ sub scheduleList {
     &DEBUG("end of sList.");
 }
 
-sub getChanConfDefault {
-    my($what, $default, $chan) = @_;
-
-    if (exists $param{$what}) {
-       if (!exists $cache{config}{$what}) {
-           &status("conf: backward-compat: found param{$what} ($param{$what}) instead.");
-           $cache{config}{$what} = 1;
-       }
-
-       return $param{$what};
-    }
-
-    my $val = &getChanConf($what, $chan);
-    if (defined $val) {
-       return $val;
-    }
-
-    $param{$what}      = $default;
-    &status("conf: auto-setting param{$what} = $default");
-    $cache{config}{$what} = 1;
-
-    return $default;
-}
-
 sub mkBackup {
     my($file, $time)   = @_;
     my $backup         = 0;