Jump to content

Ircd Nicklist


Jagie

Recommended Posts

Hey I need some help for a nicklist! :)

 

Well, I really wanted a nicklist.dll one type , with the icons etc, and like the one in err0rs All'n'one script, but that is far out of my league.

 

I saw this post on a topic, i think its by err0r with this code.

dialog centerd {
  title "Center Dialog"
  size -1 -1 171 163
  option dbu
  list 1, 102 9 60 134, size
  button "Refresh List", 2, 103 145 58 12
}
on *:dialog:centerd:init:*: { getnames $active }
on *:Dialog:centerd:sclick:1: { echo -a $did(1).seltext }
on *:Dialog:centerd:sclick:2: { getnames $active }
alias getnames {
  did -r centerd 1
  var %l 1
  while ($nick($1,%l)) {
    did -a centerd 1 $v1
    inc %l
  }
}

 

That is a great piece of code. Is their a way to make it so it include the signs like "@" "~" "%" "+" of the different types of access they have.

 

Also how can I make it so it auto refreshes without it like being laggy or something. Is their a way to make it auto refresh smoothly and not see like flashes etc.

 

Any help/examples of past nicklists you have created or anything would be great! :)

 

Thanks

 

Link to comment
Share on other sites

Very basic and untested, but it will return the users mode prefix:

 

alias getnames {
  did -r $dname 1
  var %x 1
  while (%x <= $nick($active,0)) {
    did -a $dname 1 $nick($active,%x).pnick
    inc %x
  }
}

 

And just for fun you can add:

alias title {
  if (*~* iswm $nick($active,$1).pnick) && ($1 isop $active) return (Owner)
  elseif (*@* iswm $nick($active,$1).pnick) && ($1 isop $active) return (Host)
  elseif (*&* iswm $nick($active,$1).pnick) && ($1 isop $active) return (Host)
  elseif (*%* iswm $nick($active,$1).pnick) && ($1 ishop $active) return (Halfop)
}

 

And put it all together to make:

alias getnames {
  did -r $dname 1
  var %x 1
  while (%x <= $nick($active,0)) {
    did -a $dname 1 $nick($active,%x).pnick $title($nick($active,%x))
    inc %x
  }
}

which would return ~err0r (Owner)

 

PS I didnt read your last part about refreshing/lagging. I spoke to err0r about this very problem a few days ago and it seems that is always going to happen because it is the vertical scrollbar resizing, which kinda sucks.

Edited by Silo
Link to comment
Share on other sites

err0r, I know about nicklist.dll Im just not really good at that level of coding lol! :)

 

Well that works great Silo :) Brilliant job, but is it possible to make it so it refreshes automatically? Is that possible ^ :) and when you scroll down and it is auto refreshing it doesnt go all the way back to the top.

 

I really like nicklist.dll, I just cant seem to get one working for normal IRCD even that one that you posted err0r in downloads, i cant get it too change the icons to a certain one user access so like @ - Gold hammer and % - Brown hammer - & - Silver hammer and ~ Blue hammer etc :P

 

Thanks Silo, Im going to probably use that for a nicklist manager dialog :P Just trying to find out how to change the icon thing in nicklist.dll

 

Thanks all! :)

Link to comment
Share on other sites

No problem, glad it worked. nicklist.dll looks pretty neat, and I love how you still get mIRCs default nicklist, but I still can't make the switch from MDX. If you want the complete MDX version with icons just let me know. And as for the auto refresh You need to make an alias with a timer to fire the getnames alias. You'd then use that with On events, like:

 

alias _refresh .timer(REFRESH) -m 1 500 $getnames

 

On *:JOIN:*:if ($nick == $me) $_refresh
On *:PART:#:if ($nick != $me) $_refresh
On *:KICK:#:if ($knick != $me) $_refresh

And so on. I think you get the idea from there.

Link to comment
Share on other sites

Sorry, no. I mustn't of explained myself very well. I have zero knowledge of nicklist.dll. I just use MDX (old skool) to add my icons. Doesn't err0r's download work on most servers with a bit of editing? His coding is far superior to mine :)

 

*EDIT* I just noticed a flaw with the while loop, well not the loop itself, but the info returned. I don;t have time to go in to it atm (I have a job interview tomorrow morning and it is quite late). Anyway, I'll leave this

$iif($left($nick(#,Fovea).pnick,2) == &@,$right($nick(#,Fovea).pnick,-1))

to remind me what I wanted to mention.

 

 

Since we're chatting in real time - you could try this:

 

alias nickicon {
  if (*~* iswm $nick($active,$1).pnick) && ($1 isop $active) return 1
  elseif (*@* iswm $nick($active,$1).pnick) && ($1 isop $active) return 7
  elseif (*&* iswm $nick($active,$1).pnick) && ($1 isop $active) return 10
  elseif ($1 isvoice $active) return 3
  elseif (*m* !iswm $chan($active).mode) && ($1 !isvoice $active) return 8
  elseif (*%* iswm $nick($active,$1).pnick) && ($1 ishop $active) return 7
}

 

the just change the return numbers to the icon settings you want.

Edited by Silo
Link to comment
Share on other sites

Yeah it does work, but im trying to find out how to change the icons for different signs like

 

~ - Icon1

& - icon2

@ - icon3

%- icon4

+ - icon5

 

Obviously not the real names of the icons, but trying to find out how to make it like that, so i can set the icons for each access :P

Link to comment
Share on other sites

YOU change the order to suit your preference. Experiment and swap them around and then replace err0rs icons with your own :)

 

Whatever the order is in the init section is what the numbers you assign to each level.

 

*EDIT*

 

Add this to err0r's code:

RAW 352:*:{
  haltdef 
  $iif($left($7,1) == G,set %away. [ $+ [ $6 ] ] $6,unset %away. [ $+ [ $6 ] ] $6)
}

and then in his nickalias alias (line 133) add this:

  if (%away. [ $+ [ $1 ] ] == $1) return 12

and then in the init section ad this to line 76:

  did -i $dname 1,2 1 seticon normal 0, $+ $iconsnl( $+ [b]NEW ICON HERE[/b] $+ )

 

By doing this you have added a 12th icon which the %away variable is using to show users status ie Away/Active

Edited by Silo
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...