--- googlecode.com/svn/trunk/Meteor/Channel.pm 2008/02/27 13:55:35 50 +++ googlecode.com/svn/trunk/Meteor/Channel.pm 2008/02/27 21:58:56 53 @@ -77,23 +77,6 @@ $list; } -sub listChannelsUsingTemplate { - my $class=shift; - my $template=shift; - - return '' unless(defined($template) && $template ne ''); - - my $list=''; - foreach my $channelName (sort keys %Channels) - { - my $channel=$Channels{$channelName}; - - $list.=$channel->descriptionWithTemplate($template); - } - - $list; -} - sub deleteChannel { my $class=shift; my $channelName=shift; @@ -180,6 +163,7 @@ &::syslog('info','', 'joinchannel', + $subscriber->{'ip'}, $subscriber->{'subscriberID'}, $self->{'name'}, $mode, @@ -206,10 +190,9 @@ my $idx=undef; my $numsubs = scalar(@{$self->{'subscribers'}}); - for(my $i=0;$i<$numsubs;$i++) - { - if($self->{'subscribers'}->[$i]==$subscriber) - { + + for (my $i=0; $i<$numsubs; $i++) { + if($self->{'subscribers'}->[$i]==$subscriber) { $idx=$i; last; } @@ -222,6 +205,7 @@ my $timeConnected = time - $subscriber->{'ConnectionStart'}; &::syslog('info','', 'leavechannel', + $subscriber->{'ip'}, $subscriber->{'subscriberID'}, $self->{'name'}, $timeConnected, @@ -365,6 +349,8 @@ my $self=shift; my $template=shift; + return '' unless(defined($template) && $template ne ''); + $template=~s/~([a-zA-Z0-9_]*)~/ if(!defined($1) || $1 eq '') { '~'; @@ -373,7 +359,7 @@ } elsif($1 eq 'subscriberCount') { $self->subscriberCount(); } elsif($1 eq 'lastMsgID') { - $self->lastMsgID(); + $self->lastMsgID() || 0; } elsif($1 eq 'name') { $self->{'name'}; } else {