diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-27 13:40:32 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-27 13:40:32 +0000 |
commit | 662f8abfa580ebc5ea33367786d5a7f80ade6162 (patch) | |
tree | 3b557021caa58cac5240b7cc1ca0f861059ba0a1 /bin | |
parent | 8ab02f76364e3a6b6c641e7264d31c5e05134609 (diff) | |
download | drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.gz drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.bz2 drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.xz drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.zip |
do not allow to enter an url twice in blacklist/whitelist
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/drakguard | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/drakguard b/bin/drakguard index 865b198..78d34be 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -191,7 +191,10 @@ ugtk2::exit(0); sub list_add_addr { my ($list, @addr) = @_; - push @{$list->{data}}, $_ foreach @addr; + foreach my $a (@addr) { + push @{$list->{data}}, $a + unless any { $_->[0] eq $a } @{$list->{data}}; + } } sub list_remove_addr { |