- if target.include?('@') then
- user_description = plugin.describe_user(target)
- report(plugin, "Would remove user: #{user} (#{user_description})")
- else
- domain_description = plugin.describe_domain(target)
- report(plugin, "Would remove domain: #{domain} (#{domain_description})")
+ target_description = plugin.describe(target)
+ msg = "Would remove #{target.class.to_s().downcase()} #{target}"
+
+ # Only append the extra description if it's useful.
+ if not target_description.nil? and
+ not target_description.empty? and
+ not target_description == target.to_s() then
+ msg += " (#{target_description})"