on 1:join:*:{
if ($nick == $me) && ( $chan isin $read(channels.txt) ) {

that might not be exactly rite but along that lines basically you should need to scan the ini file with the channels for a match then execute