jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [shoutcast/] [platform/] [common.pm] - Blame information for rev 20

 

Line No. Rev Author Line
11simandlpackage HotSaNICmod::common;
2 
3sub version {
4 ($VERSION = '$Revision: 1.6 $') =~ s/.*(\d+\.\d+).*/$1/;
5 return "common.pm $VERSION";
6 }
7 
8sub configure {
9 return HotSaNICparser::get_moduleconfig(".",(METHOD=>"var","STREAM"=>"array"));
10 }
11 
12sub get_names {
13 my $entry=shift || ",";
14 my $host="";
15 my $community="";
16 
17 my ($item,$description,$speed)=split /,/,$entry;
18 if( index($item, "SNMP:") >= 0) { (undef,$host,$community,$item) = split /:/, $item; }
19 if ($host ne "") { $name="$host:$item"; }
20 else { $name=$item; }
21 ($dbname=$name) =~ s/^http:\/\///g;
22 $dbname =~ s/\//_/g;
23 $dbname =~ s/:/_/g;
24 ($file=$dbname) =~ s/[.:]/_/g;
25 
26 return ($host,$community,$item,$dbname,$name,$file,$description);
27 }
28 
291;
30 

Powered by WebSVN 2.2.1