+ 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,$_);
+ }
+
+ my @time;
+ foreach (sort { $a <=> $b } keys %time) {
+ my $str = join(", ", sort keys %{ $time{$_} });
+ &DEBUG("time => $_, str => $str");
+ push(@time, "$str (".&Time2String($_).")");
+ }
+
+ &pSReply( &formListReply(0, "Schedulers: ", @time ) );
+ &pSReply( &formListReply(0, "Scheds to run: ", sort @list ) );
+ &pSReply( &formListReply(0, "Scheds running(should not happen?) ", sort @run ) );
+
+ return;
+ }
+
+ # quite a cool hack: reply in DCC CHAT.
+ $msgType = "chat" if (exists $dcc{'CHAT'}{$who});
+
+ my $done = 0;
+ $done++ if &parseCmdHook("main", $message);
+ $done++ if &parseCmdHook("extra", $message);
+ $done++ unless (&Modules());
+
+ if ($done) {
+ &DEBUG("running non DCC CHAT command inside DCC CHAT!");
+ return;
+ }
+