well i dont understand why you would need to rejoin, nor do i understand what 'fint' means

but to set the var

set %var $chan($chan).topic

then u can just do: topic $chan %var

that is asuming u have ops... unless +t isnt set .. your checking before you part if the total number of ppl in the chan is 2 .. so the chan wont be empty when you hop .. *shrug*

Cobra^