Jump to content

Nicklist Probs


Neo-Ravencroft

Recommended Posts

hi all,

im haveing a problem with a nicklist im recodeing for a friend.

the problem im haveing is this;

im trying to remove my nick from the nicklist i got this done thanks to code from ozzy in the MSN section... but my problem is, that any nick below mine when i click it selects the nick above it... i had this fixed by adding a

if ($nick($1,%l) == $me) did -a nick. [ $+ [ $1 ] ] 1 0 $chr(160)

which does fix the problem, but it adds a space where my name would be lol


alias -l refresh { 
 if (!$dialog(nick. [ $+ [ $1 ] ])) return 
 did -r nick. [ $+ [ $1 ] ] 1
 var %l 1
 while (%l <= $nick($1,0)) { 
   did -a nick. [ $+ [ $1 ] ] 1 0 + $nickicon($nick($1,%l),$1) $nick($1,%l)
   if ($nick($1,%l) == $me) did -ra nick. [ $+ [ $1 ] ] 8 0 + $nickicon($nick($1,%l),$1) $nick($1,%l)
   did -ra nick. [ $+ [ $1 ] ] 4 $nick($1,0) People Talking
   inc %l
 }
}

lol any help would be great! lol

Edited by Neo-Ravencroft
Link to comment
Share on other sites

alias -l refresh { 
if (!$dialog(nick. [ $+ [ $1 ] ])) return 
did -r nick. [ $+ [ $1 ] ] 1
set %l 1
while (%l <= $nick($1,0)) { 
  if ($nick($1,%l) != $me) did -a nick. [ $+ [ $1 ] ] 1 0 + $nickicon($nick($1,%l),$1) $nick($1,%l)
  if ($nick($1,%l) == $me) did -ra nick. [ $+ [ $1 ] ] 8 0 + $nickicon($nick($1,%l),$1) $nick($1,%l)
  did -ra nick. [ $+ [ $1 ] ] 4 $nick($1,0) People Talking
  inc %l
}
}

Link to comment
Share on other sites

yea that's what i was saying before. You are going to run into problems around this area. You need to either store all the names in a hash table/ini file, and each time you right click on that nick, it checks for the real nick

 

or

 

i did in GuarDDog v. 4, where it stores the position that i am ment to be in a variable, and if that user is after my number or equal to my number in the list, it plus 1 and then checks for the information, that way you get the right info.

 

2 alternatives you can try, both will work, but speed wise, i'm not to sure.

Link to comment
Share on other sites

lol, my expertise in GuarDDog v. 4, confuse everyone with mass alias in 1 page tongue.gif.

 

this should give you some help.

 

it is the alias i use to retrieve the nick position.

 

gdnick { return $nick($active,$iif($did($did).sel > %me,$did($did).sel,$calc($did($did).sel -1))) }

Link to comment
Share on other sites

strange how you guys have this prob, my nicklist removes my nick and puts it in another box and i dont have to -1 to it

 

it keeps it correct without doing that

maybe its how you have made your lists

Link to comment
Share on other sites

well using a few if's and a bit of work... and about 20 extra lines of code i dont need, but have to use cause i have no clue what im doing i have it working.... but i have one small problem that i cant seem to get:

 

How can i make the nicklist refresh when i switch channels? like im in #linux, and i switch to #Windows make it so the windows nicklist refreshes?

i need this because, i have a variable set when the nicklist refreshes that grabs my posistion in the nicklist, and -1's or does nothing depending on where i am and the next nick is, but if my nick is in diffrent posistions in diffrent rooms, it throws it off a bit. and i have no idea what code to use lol

 

Thanks Neo

 

P.S. thanks Gate for the alias but it just confused me more :s i have alot of learning to do before i can do the complicated stuff lol

Edited by Neo-Ravencroft
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...