This line doesn't seem to be working right:

set %userchans $reptok(%a,$+($chan $+ *),$+($chan $+ $chr(124) $+ $ctime),1,32)

When a user joins the channel with just the channel in there data and not the $ctime, it's not adding the $time to the channel names for their data. If a user joins the channel and they do have the $ctime attached to the channel name, it's not updating the channel $ctime (second half of the data value).

channelname|$ctime