New CLEAR command, removes all rules from a list
[rxpd] / src / rxpd_connection_cmd.c
index 620596b..b91f8e5 100644 (file)
@@ -285,6 +285,15 @@ rxpd_connection_cmd_SAVE (struct rxpd_connection* self)
 }
 
 
+void
+rxpd_connection_cmd_CLEAR (struct rxpd_connection* self)
+{
+  RXPD_FILENAME_REQUIRED;
+
+  rxpd_file_rules_delete (self->file);
+  rxpd_buffer_printf (&self->out, "#OK:\n");
+}
+
 void
 rxpd_connection_cmd_DELETE (struct rxpd_connection* self)
 {