]> git.donarmstrong.com Git - infobot.git/commitdiff
- list all schedulers and their respective time-of-next-run
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 7 Feb 2001 14:12:03 +0000 (14:12 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 7 Feb 2001 14:12:03 +0000 (14:12 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@359 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/UserDCC.pl

index 7fef535c21fd3969b0b54c0c804db4f3395103b5..9343338c1ac74a6323ef7e8617c5d62a23bac43d 100644 (file)
@@ -1204,15 +1204,25 @@ sub userDCC {
     if ($message =~ /^sched$/) {
        my @list;
        my @run;
+
+       my %time;
        foreach (keys %sched) {
            next unless (exists $sched{$_}{TIME});
+           $time{ $sched{$_}{TIME}-time() }{$_} = 1;
            push(@list,$_);
 
            next unless (exists $sched{$_}{RUNNING});
            push(@run,$_);
        }
 
-       &pSReply( &formListReply(0,"Scheds to run: ", sort @list ) );
+       my @time;
+       foreach (sort { $a <=> $b } keys %time) {
+           my $str = join(", ", sort keys %{ $time{$_} });
+           push(@time, "$str (".&Time2String($_).")");
+       }
+
+       &pSReply( &formListReply(0, "Schedulers: ", sort @time ) );
+       &pSReply( &formListReply(0, "Scheds to run: ", sort @list ) );
        &pSReply( &formListReply(0, "Scheds running(should not happen?) ", sort @run ) );
 
        return;