projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed old tunnel. Implemented speak bin
[clearscm.git]
/
maps
/
bin
/
add2nulllist.pl
diff --git
a/maps/bin/add2nulllist.pl
b/maps/bin/add2nulllist.pl
index
b6003c2
..
8ae2c78
100755
(executable)
--- a/
maps/bin/add2nulllist.pl
+++ b/
maps/bin/add2nulllist.pl
@@
-4,7
+4,7
@@
use warnings;
use FindBin;
use FindBin;
-use lib
$FindBin::Bin
, '/opt/clearscm/lib';
+use lib
"$FindBin::Bin/../lib"
, '/opt/clearscm/lib';
use MAPS;
use MAPSLog;
use MAPS;
use MAPSLog;
@@
-16,8
+16,8
@@
my $userid = $ENV{USER};
my $Userid;
my $type = "null";
my $Userid;
my $type = "null";
-sub GetItems {
- my
$filename = shift
;
+sub GetItems
($)
{
+ my
($filename) = @_
;
my @items;
my @items;
@@
-28,7
+28,7
@@
sub GetItems {
my @fields = split;
my %item;
my @fields = split;
my %item;
- my @address = split /\@/, $fields
[0];
+ my @address = split /\@/, $fields[0];
$item{pattern} = $address[0];
$item{domain} = $address[1];
$item{pattern} = $address[0];
$item{domain} = $address[1];
@@
-43,13
+43,13
@@
sub GetItems {
return @items;
} # GetItems
return @items;
} # GetItems
-sub Add2List {
+sub Add2List
(@)
{
my @items = @_;
my @items = @_;
- my $sender =
""
;
- my $nextseq =
MAPSDB::GetNextSequenceNo $userid, $type
;
+ my $sender =
''
;
+ my $nextseq =
GetNextSequenceNo($userid, $type)
;
- for
each
(@items) {
+ for (@items) {
my %item = %{$_};
my $pattern = $item{pattern};
my %item = %{$_};
my $pattern = $item{pattern};
@@
-64,24
+64,25
@@
sub Add2List {
$sender = lc ("$pattern\@$domain");
$sender = lc ("$pattern\@$domain");
- if (OnNulllist
$sender
) {
- display
" Already on list"
;
+ if (OnNulllist
($sender)
) {
+ display
' Already on list'
;
} else {
} else {
- Add2Nulllist
$sender, $userid, $comment, $hit_count
;
- display
" done"
;
+ Add2Nulllist
($sender, $userid, $comment, $hit_count)
;
+ display
' done'
;
# Now remove this entry from the other lists (if present)
# Now remove this entry from the other lists (if present)
- for
each my $otherlist ("white", "black"
) {
- my $sth = FindList
$otherlist, $sender
;
+ for
my $otherlist ('white', 'black'
) {
+ my $sth = FindList
($otherlist, $sender)
;
my ($sequence, $count);
my ($sequence, $count);
- ($_, $_, $_, $_, $_, $sequence) = GetList
$sth
;
+ ($_, $_, $_, $_, $_, $sequence) = GetList
($sth)
;
if ($sequence) {
if ($sequence) {
- $count = DeleteList
$otherlist, $sequence
;
+ $count = DeleteList
($otherlist, $sequence)
;
} # if
} # if
- } # for
each
+ } # for
} # if
} # if
+
$nextseq++;
} # while
$nextseq++;
} # while
@@
-91,16
+92,16
@@
sub Add2List {
# Main
my $filename;
# Main
my $filename;
-if ($ARGV
[0]) {
+if ($ARGV[0]) {
$filename = $ARGV[0];
} else {
error "Must specify a filename of addresses to null list", 1;
} # if
$filename = $ARGV[0];
} else {
error "Must specify a filename of addresses to null list", 1;
} # if
-SetContext
$userid
;
+SetContext
($userid)
;
$Userid = ucfirst $userid;
$Userid = ucfirst $userid;
-Add2List
(GetItems $filename
);
+Add2List
(GetItems ($filename)
);
exit;
exit;