+}
+
+sub dccStatus {
+ return unless (scalar keys %{ $dcc{CHAT} });
+
+ if (@_) {
+ &ScheduleThis(10, "dccStatus");
+ return if ($_[0] eq "2"); # defer.
+ }
+
+ my $time = strftime("%H:%M", localtime(time()) );
+
+ my $c;
+ foreach (keys %channels) {
+ my $c = $_;
+ my $users = keys %{ $channels{$c}{''} };
+ my $chops = keys %{ $channels{$c}{o} };
+ my $bans = keys %{ $channels{$c}{b} };
+
+ my $txt = "[$time] $c: $users members ($chops chops), $bans bans";
+ foreach (keys %{ $dcc{'CHAT'} }) {
+ next unless (exists $channels{$c}{''}{lc $_});
+ $conn->privmsg($dcc{'CHAT'}{$_}, $txt);
+ }
+ }
+}
+
+sub scheduleList {
+ ###
+ # custom:
+ # a - time == now.
+ # b - weird time.
+ ###
+
+ &DEBUG("sched:");
+ foreach (keys %{ $irc->{_queue} }) {
+ my $q = $_;
+
+ my $sched;
+ foreach (keys %sched) {
+ next unless ($q eq $sched{$_});
+ $sched = $_;
+ last;
+ }
+
+ my $time = $irc->{_queue}->{$q}->[0] - time();
+
+ if (defined $sched) {
+ &DEBUG(" $sched($q): ".&Time2String($time) );
+ } else {
+ &DEBUG(" NULL($q): ".&Time2String($time) );
+ }
+ }
+
+ &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;
+ }