All pastes #805485 Raw Edit

Team Leader

public text v1 · immutable
·published 2007-12-04 12:20 UTC
rendered paste body
;-----------------------------------------------------
;Friend List
;-----------------------------------------------------

alias FriendList { dialog -m FriendList FriendList }
dialog FriendList {
  title "FriendList By DaNGeR_Boy"
  size -1 -1 105 155
  option dbu
  list 1,3 5 99 100, hsbar vsbar
  check ,2,5 105 10 10
  check ,3,5 118 10 10
  text "Op Friends" ,4,15 107 40 10
  text "Voice Friends" ,5,15 120 40 10
  button "Remove Friend" ,6,55 110 45 12
  button "Close/OK" ,7, 33 133 40 17,ok

}
on *:dialog:FriendList:*:*:{
  if ($devent == init) { 
    if (%friend.op) { did -c $dname 2 }
    if (%friend.voice) { did -c $dname 3 }
    var %x = 1 | while $ulist(*,friend,%x) { did -a $dname 1 $v1 | inc %x } 
  }
  if ($devent == sclick) {
    if ($did == 2) {
      if ($did($dname,2).state) { set %friend.op on }
      else { unset %friend.op }
    }
    if ($did == 3) {
      if ($did($dname,3).state) { set %friend.voice on }
      else { unset %friend.voice }
    }
    if ($did == 6) {
      if ($did($dname,1).sel) {
        .ruser friend $did($dname,1).seltext
        did -d $dname 1 $did($dname,1).sel
      }
    }
  }
}

on friend:join:#:{
  if ($chan != #idlerpg) {
    .timer 1 1 msg #  Friend List: $nick $+ .
    if (%friend.op) && ($me isop #) && ($chan != #HelpDesk) && ($chan != #Help)  { timer 1 5 mode # +o $nick }
    if (%friend.voice) && ($me isop #) && ($chan != #HelpDesk) && ($chan != #Help)  { timer 1 5 mode # +v $nick }
  }
}

menu nicklist {
  -
    Frined List  
  .add friend: auser friend $$1  
  .remove friend: ruser friend $$1 

  }