Added by Mr. BS about 9 years ago
Continuing to small snippets sharing, here is one to rejoin channels when everyone left, then server gives you auto op.
; Rejoin channel when everyone leave (to auto get op from chanserv) on *:PART:#:if ($nick(#,0) == 1) && ($me !isop #) hop -n #