You can add this to doexpirethreads, down towards the bottom, right before the $html -> send_header() line;

require("admin/admin.inc.php");
admin_log("DELETETHREAD", "{$user['U_Username']}:$Keyword:$Number");