How are you avoiding stickies? I was looking at the simple code in this mod and I see:
PHP Code:
while ($thread = $vbulletin->db->fetch_array($threads))
{
delete_thread($thread['threadid'], false, true, NULL, false, $thread);
}
That easily can be added with a IF block to evaluate if the thread is sticky. Is that all you did? Something like this:
PHP Code:
while ($forum = $vbulletin->db->fetch_array($forums))
{
$threads = $vbulletin->db->query_read("SELECT threadid, forumid, visible, open, pollid, title, sticky FROM " . TABLE_PREFIX . "thread WHERE forumid=$forum[forumid] AND visible IN (0,1,2) AND sticky IN (0,1) AND lastpost <= " . (TIMENOW - ($forum['pruneafter'] * 86400)));
while ($thread = $vbulletin->db->fetch_array($threads))
{
if ( $thread['sticky'] == 0 )
{
delete_thread($thread['threadid'], false, true, NULL, false, $thread);
}
}
build_forum_counters($forum['forumid']);
}
which adds "sticky" to the thread query, and then ignores the delete_thread call if the thread is sticky. Hmmmm I bet it would be trivial to make this a checkbox option in the forum edit/setup page.