Skip to content
MSN

Nicklist Help

A TG007 community discussion started by Entox|cated.

Discussion 1 post
Page 1 of 1
Open
Topic #305 · 1 published post · 348 views

Righty ho people i have made a Nicklist with the help of Binime .. It look's Good but i cant get it to show icon's for the people that are away or .. people that are there but aint got Hammer's and is there any way at all to get the nick list where it will like sort of actually do the action's straight away with out using a time.. Lost .. ?

then let me explain in more depth and detail .. i am look for a way where the nicklist will b like mIRC'S but with out using a time to refresh ever second like i am now ..what is i am after something that will make it do the action instantly..

 

and another problem is there anyway of getting the nicklist to open and close when i join / part a room.. ? cos at the moment i am using CONNECT and DISCONNECT.. : but they are doing my head in lol..

 

Here's The Code..

 

 

  
#nicklist on
on *:connect:{ /dialog -m nicklist nicklist
timerrefreshnick 1000 5 /getnicklist
}
on *:disconnect:{ /dialog -x nicklist nicklist }
dialog nicklist {
title "Nicklist"
size -1 -1 180 529
option pixels
list 1, 6 53 168 430, size sort
edit "Edit", 2, 7 20 131 25
icon 3, 141 20 31 23
button "Whois", 4, 6 485 79 20
button "Ignore", 6, 6 507 79 20
button "Un-Ignore", 7, 93 507 79 20
button "Whisper", 5, 93 485 79 20
}

on *:dialog:nicklist:*:*:{
if ($DEVENT == init) {
  //dll $ReBar Dock $dialog(nicklist).hwnd > right
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname
  dll $mdx SetFont $dname
  dll $mdx SetDialog $dname bgcolor $rgb(0,0,0)
  dll $mdx SetControlMDX $dname 1 ListView noheader smallicon hottrack single > dll\views.mdx

  did -i $dname 1 1 iconsize normal small
  did -i $dname 1 1 seticon normal 0, $+ icons\owner.ico
  did -i $dname 1 1 seticon normal 0, $+ icons\host.ico
  did -i $dname 1 1 seticon normal 0, $+ icons\spec.ico
  did -i $dname 1 1 seticon normal 0, $+ icons\voice.ico
  did -i $dname 1 1 seticon normal 0, $+ icons\cup.ico

  did -i $dname 1 1 settxt color $rgb(255,255,255)
  did -i $dname 1 1 settxt bgcolor $rgb(0,0,0)
  did -i $dname 1 1 setbkg color $rgb(0,0,0)
  did -i $dname 1 1 setcolor line $rgb(255,255,255)
  $getnicklist
}
}
alias getnicklist {
set %total $nick($active,0)
set %channel $active
set %modes $chan($active).mode
did -r nicklist 1
var %n 1
while (%n <= $nick($active,0)) {
  did -a nicklist 1 0 + $geticons($nick($active,%n)) $msn.ifdecode($replace($nick($active,%n), >,Guest))
  inc %n
}
}
alias geticons {
if (Admin iswm $left($1,5)) return 1
elseif (Sysop iswm $left($1,5)) return 1
elseif (Guide iswm $left($1,5)) return 1
elseif ($1 isowner $active) return 1
elseif ($1 isop $active) return 2
elseif (*+*m* isincs $chan($active).mode) && ($1 !isvoice $active) return 3
elseif (*+*m* !isincs $chan($active).mode) && ($1 isvoice $active) return 4
elseif (*+*m* isincs $chan($active).mode) && ($1 isvoice $active) return 4
elseif (*+*m* isincs $chan($active).mode) && ($1 !isvoice $active) return 4
elseif ($isaway($1)) return 5
}
alias a.refresh { 
var %away 14
var %normal 00
var %s 1,%c 1
while (%s <= $scon(0)) { 
  scon %s
  %c = 1 | %n = 1 
  while (%c <= $chan(0)) { while (%n <= $nick($chan(%c),0)) { cline $iif($isaway($nick($chan(%c),%n)),%away,%Normal) $chan(%c) %n | inc %n } | inc %c }
  inc %s
}
scon -r 
}
alias isaway { return $iif($hget(arf $+ $cid,$1),$true,$false) }
alias arf {
inc -u8 %arf
var %l 1,%s 1,%c 1
while (%l <= $scid(0)) {
  while (!$scid(%s)) { inc %s }
  var %c 1 | scid %s
  if (!$hget(arf $+ $cid)) hmake arf $+ $cid
  while (%c <= $chan(0)) { who $chan(%c) | inc %c }
  inc %l | inc %s
}
scid -r
}
raw 352:*: { hadd arf $+ $cid $6 $iif($left($7,1) == g,1,0) | if (%arf) haltdef | $iif($left($7,1) == g,1,0) { /auser cup $address($6,1) } }
raw 315:*: { if (%arf) haltdef | a.refresh }
raw 305:*: { hadd arf $+ $cid $me 0 }
raw 306:*: { hadd arf $+ $cid $me 1 }
#nicklist end

 

 

 

 

Any improvement's then please let me know .. smile.gif

as they would be greatfully excepted .. and Big shout out to Binime For the Help on it..smile.gif thank's m8 .. smile.gif

Edited Apr 18, 2004 4:19 PM by Entox&#124;cated