meh
Posted by DarkJFMan
Tuesday, August 31, 2004
Description: meh

on *:DIALOG:DarkJFMan:sclick:65: {
  if ($did(DarkJFMan,62).seltext != $null) {
    set %chan.nick $did(DarkJFMan,62).seltext
    did -a DarkJFMan 56 There are $nick($did(DarkJFMan,62).seltext,0) nick(s)
    var %x = 1
    while ($nick($did(DarkJFMan,62).seltext,%x)) {
      if ($nick isop $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 @ $+ $ifmatch }
      if ($nick isvoice $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 + $+ $ifmatch }
      if ($nick isreg $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 $ifmatch }
      inc %x
    }
  }
}
Subject line
Posted by Sigh
Tuesday, August 31, 2004 10:53pm PDT
Instead of the while loop, why don't you use /filter -wlo $did(62).seltext DarkJFMan 56
Subject line
Posted by DarkJFMan
Wednesday, September 01, 2004 02:28am PDT
What do you mean, can you write it out, all i'm trying to do is w/e chans i'm in it does (in list box)

#chan1       #chan(w/e): @nick1
#chan2                        :@nick2
#chan3                       :+nick3
                                   :nick4
Subject line
Posted by Sigh
Wednesday, September 01, 2004 05:19pm PDT
All I was suggesting was that this piece of code in your paste:


var %x = 1
    while ($nick($did(DarkJFMan,62).seltext,%x)) {
      if ($nick isop $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 @ $+ $ifmatch }
      if ($nick isvoice $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 + $+ $ifmatch }
      if ($nick isreg $did(DarkJFMan,62).seltext) { did -a DarkJFMan 56 $ifmatch }
      inc %x
    }


Can be replaced by the following line:

filter -wlo $did(62).seltext DarkJFMan 56

Which accomplishes the same, it dumps the nicklist of the channel $did(62).seltext into the list/combo ID 56 in your DarkJFMan dialog. It ought to be faster, and is shorter, so it's worth a try



Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world