77 |
$list; |
$list; |
78 |
} |
} |
79 |
|
|
|
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; |
|
|
} |
|
|
|
|
80 |
sub deleteChannel { |
sub deleteChannel { |
81 |
my $class=shift; |
my $class=shift; |
82 |
my $channelName=shift; |
my $channelName=shift; |
163 |
|
|
164 |
&::syslog('info','', |
&::syslog('info','', |
165 |
'joinchannel', |
'joinchannel', |
166 |
|
$subscriber->{'ip'}, |
167 |
$subscriber->{'subscriberID'}, |
$subscriber->{'subscriberID'}, |
168 |
$self->{'name'}, |
$self->{'name'}, |
169 |
$mode, |
$mode, |
190 |
|
|
191 |
my $idx=undef; |
my $idx=undef; |
192 |
my $numsubs = scalar(@{$self->{'subscribers'}}); |
my $numsubs = scalar(@{$self->{'subscribers'}}); |
193 |
for(my $i=0;$i<$numsubs;$i++) |
|
194 |
{ |
for (my $i=0; $i<$numsubs; $i++) { |
195 |
if($self->{'subscribers'}->[$i]==$subscriber) |
if($self->{'subscribers'}->[$i]==$subscriber) { |
|
{ |
|
196 |
$idx=$i; |
$idx=$i; |
197 |
last; |
last; |
198 |
} |
} |
205 |
my $timeConnected = time - $subscriber->{'ConnectionStart'}; |
my $timeConnected = time - $subscriber->{'ConnectionStart'}; |
206 |
&::syslog('info','', |
&::syslog('info','', |
207 |
'leavechannel', |
'leavechannel', |
208 |
|
$subscriber->{'ip'}, |
209 |
$subscriber->{'subscriberID'}, |
$subscriber->{'subscriberID'}, |
210 |
$self->{'name'}, |
$self->{'name'}, |
211 |
$timeConnected, |
$timeConnected, |
349 |
my $self=shift; |
my $self=shift; |
350 |
my $template=shift; |
my $template=shift; |
351 |
|
|
352 |
|
return '' unless(defined($template) && $template ne ''); |
353 |
|
|
354 |
$template=~s/~([a-zA-Z0-9_]*)~/ |
$template=~s/~([a-zA-Z0-9_]*)~/ |
355 |
if(!defined($1) || $1 eq '') { |
if(!defined($1) || $1 eq '') { |
356 |
'~'; |
'~'; |
359 |
} elsif($1 eq 'subscriberCount') { |
} elsif($1 eq 'subscriberCount') { |
360 |
$self->subscriberCount(); |
$self->subscriberCount(); |
361 |
} elsif($1 eq 'lastMsgID') { |
} elsif($1 eq 'lastMsgID') { |
362 |
$self->lastMsgID(); |
$self->lastMsgID() || 0; |
363 |
} elsif($1 eq 'name') { |
} elsif($1 eq 'name') { |
364 |
$self->{'name'}; |
$self->{'name'}; |
365 |
} else { |
} else { |