sub populate_chan { if ($debug == 1) { debug('SYS\CHAN_DB',"Populate channel list called"); } my @chans; my $host = $_[0]; my $cycle = 0; my @tempbuf = split(/\s+/,$_[2]); foreach my $temp_proc (@tempbuf) { if (substr($temp_proc,0,1) eq ':') { $temp_proc = substr($temp_proc,1); } if (substr($temp_proc,0,1) eq '+') { $temp_proc = substr($temp_proc,1); $channels{$base}{$_[1]}{$temp_proc}{mode} = '+v'; if ($debu elsif (substr($temp_proc,0,1) eq '%') { $temp_proc = substr($temp_proc,1); $channels{$base}{$_[1]}{$temp_proc}{mode} = '+h'; if ($d elsif (substr($temp_proc,0,1) eq '@') { $temp_proc = substr($temp_proc,1); $channels{$base}{$_[1]}{$temp_proc}{mode} = '+o'; if ($d elsif (substr($temp_proc,0,1) eq '!') { $temp_proc = substr($temp_proc,1); $channels{$base}{$_[1]}{$temp_proc}{mode} = '+a'; if ($d else { $channels{$base}{$_[1]}{$temp_proc}{mode} = "+r"; if ($debug == 1) { debug('SYS\CHAN_DB',"added user $temp_proc to database if (($cycle + int(rand(9))) >= 50) { if ($debug == 1) { debug('SYS\CHAN_DB',"Selecting random user to whois: $temp_proc"); } $cycle = 0; } $cycle++; } }