PowerPuffGold.2000 — File Browser

PowerPuffGold.2000v2.0 / PowerPuffGold.2000v2.0 / PowerPuffGold2000 / remotes / away-dialog.mrc

away-dialog.mrc — 2.67 KB — Download this file

dialog awayd { 
  title "Set Away" 
  size -1 -1 255 120 

  icon 8, 0 -12 255 43, tbar2.bmp, 0
  text "Away message?", 202, 14 16 78 20 

  edit "", 1, 10 30 240 22, result autohs 

  check "&Pager on", 2, 10 60 65 16 
  check "&Logging on", 3, 95 60 75 16 
  check "&Away Nick", 4, 180 60 85 16

  box "", 100, 6 74 245 41
  button "OK", 101, 40 86 80 25, OK default 
  button "Cancel", 102, 140 86 80 25, cancel 

}
dialog awaytxt {
  title "Read Away Msg's"
  size -1 -1 250 80

  text "You have messages! Do you wish to read them?", 202, 14 10 230 20

  box "", 100, 25 35 201 40
  button "YES",  101, 30 46 80 25, OK default
  button "NO",  102, 140 46 80 25, cancel 
}
alias ppgaway { 
  /dialog -m awayd awayd -4
}
alias ppgback {
  resetidle
  set %away NO
  if ($server) { away }
  if (%anick == ON) { /nick $remove($me,-AFK) }
  if ($comchan($me,0) != 0) { amsg 0,11<12>11,12<2>12,2< 11I'm back from8 $chr(40) $+  $+ %areason $+  $+ $chr(41) 11Gone: $+ 8 $duration($calc($ctime - %gonetime)) $+  12>2,12<11>12,11<0> }
  unset %areason
  unset %gonesec
  set -u300 %justback YES
  if (%msglog == ON) && (%awaytxt == ON) { 
    unset %awaytxt
    $dialog(awaytxt,awaytxt,-4) 
  }
  if (%pager == ON) { goto pages }
  halt
  :pages
  if (%pagecount > 0) {
    set %read 1
    :loop
    echo -a %page. [ $+ [ %read ] ]
    inc %read 1
    if (%read > %pagecount) { unset %page.* %read %pagecount | unset %gonesec }
    else { goto loop }
  } 
}
on *:DIALOG:awaytxt:sclick:101:{ 
  run notepad $mircdiraway.txt 
}
on *:DIALOG:awayd:edit:1:{
  set %areason $did(1)
}
on *:DIALOG:awayd:sclick:101:{
  set %gonetime $ctime
  set %away YES
  if (%pager == ON) { set %pager2 To page me type /ctcp $me PAGE <reason> | set %pagecount 0 }
  if (%pager == OFF) { unset %pager2 | unset %pagecount }
  if ($server) { away I am away ( $+ %areason $+ $chr(41) $+ . You can reach me at: $chr(2) $+ %email $chr(2) }  
  if ($comchan($me,0) != 0) { amsg 0,11<12>11,12<2>12,2< 11I'm away8 $chr(40) $+  $+ %areason $+  $+ $chr(41) 11Pager:8  $+ $upper(%pager) 11,2Message log:8,2  $+ $upper(%msglog) 11,2 %pager2 12,2>2,12<11>12,11<0>  }
}

on *:DIALOG:awayd:sclick:2:{ 
  set %checkpager $did(2).state 
  if ($did(2).state) set %pager ON
  else set %pager OFF 
}
on *:DIALOG:awayd:sclick:3:{ 
  set %checklog $did(3).state 
  if ($did(3).state) set %msglog ON 
  else set %msglog OFF
}
on *:DIALOG:awayd:init:*:{ 
  if (%checkpager) { did -c awayd 2 } 
  if (%checklog) { did -c awayd 3 } 
}
on *:DIALOG:awayd:sclick:4:{
  if ($did(4).state) {
    set %anick ON
    nick $me $+ -AFK
  }
  else set %anick == OFF
}