Skip to content
MSN

recent rooms

A TG007 community discussion started by SpAzZ.

Discussion 6 posts
Page 1 of 1
Open
Topic #1459 · 6 published posts · 856 views

Its me again, its been a while, but I'm back. This time i need some help figuring out how to make it so that in my con, i can right click and go to recent rooms and it will show the recent rooms, like if i store them in a text file, do i use like $lines or what? please help. Thanks,

--SpAzZ--

(Blue fusion soon to come, so watch out happy.gif )

You can probably find an addon for it in different script sites. I wouldn't doubt that theres not one. biggrin.gif

Feel like going a lil experimental so if this doesn't work, tough laugh.gif

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 tongue.gif

 

Enjoy smile.gif

 

nothing shows up under recent rooms in the popups

Blue Fusion is taken by Mike aka Sherrifx`.

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)

}

}

Change %a) to %a }