teh
Posted by Psycho
Sunday, June 13, 2004
Description: Update to dialog'ed users

#dialog_users on
dialog ulist {
  title "Channel User List"
  size -1 -1 278 130
  option dbu
  list 1, 0 1 278 118, size
  button "Users", 4, 241 120 37 10, flat
  button "Op List", 2, 39 120 37 10, flat
  button "Master List", 3, 77 120 37 10, flat
  button "Peon List", 5, 1 120 37 10, flat
  button "Coowner List", 6, 115 120 37 10, flat
  button "Owner List", 7, 153 120 37 10, flat
  edit "", 8, 191 120 49 9
}

alias ulist {
  dialog -dmo ulist ulist
}

on *:dialog:ulist:init:*:{
  mdx SetMircVersion $version
  mdx MarkDialog $dname
  mdx SetBorderStyle 2,3,4,5,6,7 clientedge
  mdx SetControlMDX 1 listview grid report sortheader rowselect > $scriptdirviews.mdx
  did -i ulist 1 1 headerdims 90:1 70:2 130:3 170:4 79:5
  did -i ulist 1 1 headertext +c Rank $+ $chr(9) $+ +c Access $+ $chr(9) $+ +c Account $+ $chr(9) $+ +c Last Seen $+ $chr(9) $+ +c Status
}

alias mdx return $dll($scriptdirmdx.dll, $1, $iif($2, $2-, _))

on ^*:NOTICE:*:?:{
  if ($nick == Chanserv) {
    if (users from level isin $1-) haltdef
    if (Access Account Last Seen Status == $1-) haltdef
    if ($1 isnum) {
      haltdef
      if (!$dialog(ulist)) dialog -dmo ulist ulist
      var %access Peon Op Master Coowner Owner
      if ($len($1) == 3) did -a ulist 1 $gettok(%access,$left($1,1),32) $chr(9) $1 $chr(9) $iif(($3 == Here) || ($3 == Never),$2,$2) $chr(9) $iif(($3 == Here) || ($3 == Never),$3,$3-7) $chr(9) $iif(($3 == Here) || ($3 == Never),$4,$8)
      if ($len($1) < 3) did -a ulist 1 Below Peon $chr(9) $1 $chr(9) $iif(($3 == Here) || ($3 == Never),$2,$2) $chr(9) $iif(($3 == Here) || ($3 == Never),$3,$3-7)  $chr(9) $iif(($3 == Here) || ($3 == Never),$4,$8)
    }
  }
}

on *:DIALOG:ulist:sclick:*:{
  if ($did != 1) did -r ulist 1
  if ($did == 4) chanserv $did(ulist,8) users
  if ($did == 2) chanserv $did(ulist,8) olist
  if ($did == 3) chanserv $did(ulist,8) mlist
  if ($did == 5) chanserv $did(ulist,8) plist
  if ($did == 6) chanserv $did(ulist,8) clist
  if ($did == 7) chanserv $did(ulist,8) wlist
}
#dialog_users end
menu status,query,channel,menubar {
  Dialog'ed Users $group(#dialog_users)
  .Turn On:.enable #dialog_users | echo -a Dialog'ed users list activated!
  .Turn Off:.disable #dialog_users | echo -a Dialog'ed users list disabled!
  .Users of #:.chanserv users #
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world