if (anp->marker == themarker)
continue;
+ /* HACK: don't ever delete the last user -- prevents userids being reused */
+ if (vrup->ID == lastuserID)
+ continue;
+
if(!anp->nicks && !UHasStaffPriv(vrup) && !UIsCleanupExempt(vrup)) {
if(vrup->lastauth && (vrup->lastauth < to_age)) {
expired++;
if (!(rcp=cip->exts[chanservext]))
continue;
+ /* HACK: don't ever delete the last channel -- prevents channelids being reused */
+ if (rcp->ID == lastchannelID)
+ continue;
+
/* there's a bug here... if no joins or modes are done within the threshold
* and someone leaves just before the cleanup then the channel will be nuked.
*/