Add "IGNORED" state to actions on list members
This commit is contained in:
parent
1c8eb14154
commit
2758ba5982
1 changed files with 10 additions and 6 deletions
|
@ -76,30 +76,34 @@ def main
|
||||||
if (subscribers.include?(m))
|
if (subscribers.include?(m))
|
||||||
subscribers.delete(m)
|
subscribers.delete(m)
|
||||||
else
|
else
|
||||||
|
print "Adding #{m}... "
|
||||||
if (conf["lists_add"].include?(cn))
|
if (conf["lists_add"].include?(cn))
|
||||||
print "Adding #{m}... "
|
|
||||||
mlmmj_sub_binary = conf["mlmmj"]["sub_binary"]
|
mlmmj_sub_binary = conf["mlmmj"]["sub_binary"]
|
||||||
%x(#{mlmmj_sub_binary} -L #{list} -a #{m} -q -f -s)
|
%x(#{mlmmj_sub_binary} -L #{list} -a #{m} -q -f -s)
|
||||||
if ($?.exitstatus == 0)
|
if ($?.exitstatus == 0)
|
||||||
puts "OK"
|
puts "OK"
|
||||||
else
|
else
|
||||||
puts "Failed"
|
puts "FAILED"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
puts "IGNORED"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Remove remaining "subcribers" (= they did not match with members)
|
# Remove remaining "subcribers" (= they did not match with members)
|
||||||
if (conf["lists_remove"].include?(cn))
|
subscribers.each do |s|
|
||||||
subscribers.each do |s|
|
print "Removing #{s}... "
|
||||||
print "Removing #{s}... "
|
if (conf["lists_remove"].include?(cn))
|
||||||
mlmmj_unsub_binary = conf["mlmmj"]["unsub_binary"]
|
mlmmj_unsub_binary = conf["mlmmj"]["unsub_binary"]
|
||||||
%x(#{mlmmj_unsub_binary} -L #{list} -a #{s} -q -s)
|
%x(#{mlmmj_unsub_binary} -L #{list} -a #{s} -q -s)
|
||||||
if ($?.exitstatus == 0)
|
if ($?.exitstatus == 0)
|
||||||
puts "OK"
|
puts "OK"
|
||||||
else
|
else
|
||||||
puts "Failed"
|
puts "FAILED"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
puts "IGNORED"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print "\n"
|
print "\n"
|
||||||
|
|
Loading…
Reference in a new issue