I have modified this hack to exclude stickies and to delete threads that haven't gotten replies in X days rather than ones that have been opened x days ago. It also disregards the amount of posts in that thread.
PHP Code:
$check=$vbulletin->db->query_read("
SELECT * from `" . TABLE_PREFIX . "thread`
Where forumid IN($from) AND `postuserid` NOT IN (".$vbulletin->options['Admin'].") AND `sticky` = '0' AND `lastpost` <= '" . (TIMENOW - ($vbulletin->options['created'] * 86400)) . "'");
PHP Code:
$deletedthreads = $vbulletin->db->query_read("SELECT * FROM `" . TABLE_PREFIX . "thread` Where forumid IN($from) AND `sticky` = '0' AND `postuserid` NOT IN (".$vbulletin->options['Admin'].") AND `lastpost` <= '" . (TIMENOW - ($vbulletin->options['created'] * 86400)) . "'");
these are the modifications to the queries for anyone who needs this as well.