;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;Hash Table PassCatcher By Charles
;;;For Those Who do not no how to 
;;;Use sockreads.. charles4nat@hotmail.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dialog Passcatcher {
  title "bollix Pass Catcher dialog"
  size -1 -1 180 126
  option dbu
  edit "", 1, 7 16 124 15
  button "OwnerUp", 2, 140 16 37 15, flat
  edit "", 3, 7 32 124 17
  button "HostUp", 4, 140 32 37 16, flat
  box "Last Stored Keys", 5, 4 8 131 45
  edit "", 6, 8 65 65 10
  box "Change Passes", 7, 5 56 72 58
  button "Owner", 8, 9 80 30 12, flat
  button "Host", 9, 42 80 31 12, flat
  button "Random Pass's", 10, 9 96 64 12, flat
  icon 11, 82 58 21 16, $scriptdir $+ about.ico, 0, noborder
  text "Just  a quick pass catcher dialog i made for script nothing special might help u for quick ownering up or changing pass's.", 12, 110 58 67 34
  button "Done", 13, 79 96 98 18, flat ok cancel
  button "Refresh", 14, 79 78 28 12, flat
  text "Hash Table Pass Catcher v1 By Charles", 15, 40 116 103 8
}

on *:Dialog:Passcatcher:init:0:{
  did -a Passcatcher 1 $hget(ownerpass,$active)
  did -a Passcatcher 3 $hget(hostpass,$active)
}
on *:dialog:Passcatcher:sclick:2:{
  mode $me +h $1- $did( $dname , 1 ).text
}
on *:dialog:Passcatcher:sclick:4:{
  mode $me +h $1- $did( $dname , 3 ).text
}
on *:dialog:Passcatcher:sclick:8:{
  prop $active ownerkey $1- $did( $dname , 6 ).text
}
on *:dialog:Passcatcher:sclick:9:{
  prop $active hostkey $1- $did( $dname , 6 ).text
}
on *:dialog:Passcatcher:sclick:10:{
  prop $active ownerkey $randompass
  prop $active hostkey $randompass
}
on *:dialog:Passcatcher:sclick:10:{
  did -a Passcatcher 1 $hget(ownerpass,$active)
  did -a Passcatcher 3 $hget(hostpass,$active)
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias randompass { return $r(1,999) $+ $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(1,100) $+ $r(a,z) $+ $r(A,Z) $+ $r(a,z) $+ $r(1,9999999) $+ $r(a,z) $+ $r(A,Z) $+ $r(a,z) }
menu menubar,channel {
  PassCatcher:dialog -m passcatcher passcatcher
}
raw prop:*ownerkey*: { 
  hadd -m Ownerpass $3 $remove($5,:)
  echo @keys 30 $+ $rep($nick) $+ 3:0Ownerkey3:0 $+ $3- $+  3
  if (@keys == $null) { window @keys }
}
raw prop:*hostkey*: {
  hadd -m Hostpass $3 $remove($5,:)
  echo @keys 30 $+ $rep($nick) $+3:0Hostkey3:0 $+ $3- $+ 3
  if (@keys == $null) { window @keys }
}
on *:start: {
  hmake ownerpass 50
  hmake hostpass 50
  window @keys
}
menu @keys {
  clear:clear
}
