Feel like going a lil experimental so if this doesn't work, tough 
on *:join:#:{
if ($nick == $me) {
if ($searchini(chansr.ini,chans,#).totalnumber == 0) {
writeini chansr.ini number n $calc($iif($readini(chansr.ini,number,n),$ifmatch,0) + 1)
writeini chansr.ini chans n $+ $readini(chansr.ini,number,n) #
}
if (# != $readini(chansr.ini,chans,n1)) {
var %a = $searchini(chans.ini,chans,#), %b = $readini($chansr.ini,chans,n1)
writeini chansr.ini chans n1 #
writeini chansr.ini chans %a %b
}
}
}
;;;;
;;$serchini by CrAzY_cAfCaSi
;;;;
alias searchini {
.echo -q $read($1, ns, $+([,$2,]))
var %from.line = $readn
.echo -q $read($1, nw, [*], $calc(%from.line + 1))
var %to.line = $readn
filter -ffr $+(%from.line,-,%to.line) $1 searchini.txt $+(*=,*,$3,*)
if ($filtered == 0) {
return 0 | halt
}
if ($prop == totalnumber) {
return $filtered
.remove searchini.txt | halt
}
var %i = 1, %x
while (%i <= $lines(searchini.txt)) {
var %x = %x $gettok($read(searchini.txt, %i),1,61)
inc %i
}
.remove searchini.txt
return %x
}
;;;;
menu menubar {
Recent rooms joined
.$submenu($chansr($1))
}
alias chansr {
if ($readini(chansr.ini,number,n) => 1) {
var %a = 1
while (%a <= $readini(chansr.ini,number,n)) {
if ($1 == %a) { return $readini(chansr.ini,chans,n $+ %a) | inc %a)
}
}
If it all works, the last room joined will be at the top of the list and the rest would be basically random.
Eg: If the most recent room joined was %#channel and you clicked %#test in the list then the two channels would switch places on the list.
Be warned though, it lists all channels joined so I'd say manual deletion every now n then would be an idea.
I didn't make the list in order of the most-recently joined (except the top one) because the above is untested so I didn't really want to do too much coding just to find it doesn't work 
Enjoy 