
| Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/xsend |
#!/usr/bin/perl
@INC = ("/akt/appserv","/usr/local/bin/utility",@main::INC);
eval("use Process::msend"); print ($@);
my $par = shift;
my $mode = shift;
my @pars = ();
push(@pars,shift);
push(@pars,shift);
push(@pars,shift);
my $time = "";
my $vorwahl = "";
my $o;
foreach $o (@pars) {
next if (!$o);
if ($o =~ /^\d+\:\d+$/) { $time = $time . " " . $o; }
elsif ($o =~ /\./) { $time = $o . " " . $time; }
else { $vorwahl = $o; }
}
#---------------------------------------------------------------------
my $ecotext = {};
$ecotext->{'m'} = "";
$ecotext->{'p'} = "";
$ecotext->{'ger'} = <<'TEXT_ENDE';
pre ^0([1-9].*) 0049$1
post ^(.*) 0,$1
Mo-Fr 0-24 1.5 ^004940(.*) 01058$1 # Hamburg
Sa-So+Fei 0-24 0 ^004940(.*) $1
Mo-So 0-24 18.5 ^0049(1[67].*) 010770$1 # Mobil Deutschland
Mo-Fr 0-24 2.6 ^0049(.*) 010150$1 # Deutschland
Sa-So+Fei 0-24 0 ^0049(.*) 0$1
Mo-So 0-24 15 ^00(.*) 00$1 # Welt
Mo-So 0-24 0 ^(.*) $1 # intern
TEXT_ENDE
$ecotext->{'arcor'} = <<'TEXT_ENDE';
pre ^0([1-9].*) 0049$1
post ^(.*) 0,$1
Mo-So 0-24 0 ^004940(.*) $1 # Hamburg
Mo-So 0-24 23 ^0049(1[67].*) 0$1 # Mobil Deutschland
Mo-So 0-24 0 ^0049(.*) 0$1 # Deutschland
Mo-So 0-24 6 ^00(.*) 00$1 # Welt
Mo-So 0-24 0 ^(.*) $1 # intern
TEXT_ENDE
if ($mode =~ s/hh/f/) { $vorwahl = "0ger040"; }
if ($mode =~ s/n/f/) { $vorwahl = "0ger0911"; }
if ($mode =~ s/mz/f/) { $vorwahl = "ger06131"; }
if ($mode =~ s/hi/f/) { $vorwahl = "ger05121"; }
if ($mode =~ s/w/f/g) { $vorwahl = "ger0202"; }
if ($mode =~ s/a/f/) { $vorwahl = "0arcor0911"; }
if (!$vorwahl) { $vorwahl = "ger040"; }
$vorwahl =~ /(\d*)([a-z]+)0(.*)/;
my $amtsholung = $1;
my $land = $2;
my $vorwahl = $3;
print "LAV: $land,$amtsholung,$vorwahl\n";
if (length($amtsholung)) { $amtsholung = $amtsholung . ","; }
$ecotext->{'f'} = $ecotext->{$land};
my $vorwahl1 = "0049" . $vorwahl;
#print "VORWAHL: $vorwahl1\n";
$ecotext->{'f'} =~ s/004940/$vorwahl1/g;
$ecotext->{'f'} =~ s/post(.*) 0,/post$1 $amtsholung/;
# print $ecotext->{'f'}; exit;
print "QQ: $time\n";
if ($mode eq "f") { $mode = "f," . `/etc/syspar MODEM_LINES`; }
my $msend = Process::msend->new($mode,$ecotext,$time);
if ($mode =~ s/x//g) {
$msend->test();
}
$msend->run($par);