jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [shoutcast/] [platform/] [common.pm] - Rev 1

Compare with Previous - Blame - Download


package HotSaNICmod::common;

sub version {
  ($VERSION = '$Revision: 1.6 $') =~ s/.*(\d+\.\d+).*/$1/;
  return "common.pm $VERSION";
  }      

sub configure {
  return HotSaNICparser::get_moduleconfig(".",(METHOD=>"var","STREAM"=>"array"));
  }

sub get_names {
  my $entry=shift || ",";
  my $host="";
  my $community="";

  my ($item,$description,$speed)=split /,/,$entry;
  if( index($item, "SNMP:") >= 0) { (undef,$host,$community,$item) = split /:/, $item; }
  if ($host ne "") { $name="$host:$item"; }
  else { $name=$item; }
  ($dbname=$name) =~ s/^http:\/\///g;
  $dbname =~ s/\//_/g;
  $dbname =~ s/:/_/g;
  ($file=$dbname) =~ s/[.:]/_/g;

  return ($host,$community,$item,$dbname,$name,$file,$description);
  }

1;


Powered by WebSVN 2.2.1