]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/prune/plugins/roundcube_db.rb
Add a bunch more crap and rewrite a bunch more crap. Now the 'rm' mode at least runs.
[mailshears.git] / lib / prune / plugins / roundcube_db.rb
diff --git a/lib/prune/plugins/roundcube_db.rb b/lib/prune/plugins/roundcube_db.rb
new file mode 100644 (file)
index 0000000..6515a7b
--- /dev/null
@@ -0,0 +1,25 @@
+require 'pg'
+
+require 'common/roundcube_db_plugin'
+require 'prune/prune_plugin'
+require 'rm/plugins/roundcube_db'
+
+class RoundcubeDbPrune < RoundcubeDbRm
+
+  include RoundcubeDbPlugin
+  include PrunePlugin
+
+
+  def get_leftover_domains(db_domains)
+    # Roundcube doesn't have a concept of domains.
+    return []
+  end
+
+
+  def get_leftover_accounts(db_accounts)
+    # Get a list of all users who have logged in to Roundcube.
+    rc_accounts = self.get_roundcube_usernames()
+    return rc_accounts - db_accounts
+  end
+
+end