ref: master
plugins/spaminator/lib/spaminator_plugin.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
class SpaminatorPlugin < Noosfero::Plugin def self.plugin_name "Spaminator" end def self.plugin_description _("Search and destroy spams and spammers.") end def self.period_default_setting 30 end def self.schedule_scan(environment) settings = Noosfero::Plugin::Settings.new(environment, self) if !settings.scanning job = Delayed::Job.enqueue(SpaminatorPlugin::ScanJob.new(environment.id), :run_at => settings.period.to_i.days.from_now) settings.scheduled_scan = job.id settings.save! end end def stylesheet? true end end |