Notify List — File Browser
NotifyListv1.0 / NotifyListv1.0 / Notify / notfiy.mrc
notfiy.mrc — 24.88 KB — Download this file
;Notify List v.1.0 ©2005 Astro
;All rights reserved
;
;Main Dialog
dialog nlist {
title $strip($slogo) - Notify List
size 88 72 214 322
icon $ico(nmenu.icl), 14
box "", 1, 0 -5 214 327
list 2, 3 4 208 315, size
}
on *:dialog:nlist:*:*:{
if ($devent == sclick) {
var %tmp
if ($did == 2) && ($gettok($did($dname,2,1),1,32) == rclick) {
if ($tree($dname,2) != $null) {
%tmp = $tree($dname,2,$gettok($tree($dname,2).sel,1,32),$gettok($tree($dname,2).sel,2,32))
if ($gettok($tree($dname,2).sel,0,32) == 1) && ($nconf(nlist.view) == networks) {
mdx.new network 16 16
mdx.pop.set network bordericon emboss
mdx.pop.img network icon small $n.ico(nmenu.icl,10)
mdx.pop.img network icon small $n.ico(nmenu.icl,11)
mdx.popd network +a 1 1 &Collapse $cr did -i $dname 2 1 branch collapse $tree($dname,2).sel
mdx.popd network +a 2 2 &Expand $cr did -i $dname 2 1 branch expand $tree($dname,2).sel
$mdx.menu(network) | return
}
if ($gettok($tree($dname,2).sel,0,32) == 1) && ($nconf(nlist.view) == onoff) {
mdx.new network 16 16
mdx.pop.set network bordericon emboss
mdx.pop.img network icon small $n.ico(nmenu.icl,10)
mdx.pop.img network icon small $n.ico(nmenu.icl,11)
mdx.popd network +a 1 1 &Collapse $cr did -i $dname 2 1 branch collapse $tree($dname,2).sel
mdx.popd network +a 2 2 &Expand $cr did -i $dname 2 1 branch expand $tree($dname,2).sel
$mdx.menu(network) | return
}
if ($gettok($tree($dname,2).sel,0,32) == 1) && ($nconf(nlist.view) == online) {
mdx.new online 16 16
mdx.pop.set online bordericon emboss
mdx.pop.img online icon small $n.ico(nmenu.icl,2)
mdx.pop.img online icon small $n.ico(nmenu.icl,3)
mdx.pop.img online icon small $n.ico(nmenu.icl,4)
mdx.pop.img online icon small $n.ico(nmenu.icl,5)
mdx.pop.img online icon small $n.ico(nmenu.icl,6)
mdx.pop.img online icon small $n.ico(nmenu.icl,7)
mdx.pop.img online icon small $n.ico(nmenu.icl,12)
mdx.pop.img online icon small $n.ico(nmenu.icl,13)
mdx.pop.img online icon small $n.ico(nmenu.icl,8)
mdx.popd online +a 1 1 &Delete $tree($dname,2) $cr nlist.del $tree($dname,2)
mdx.popd online $iif($notify($tree($dname,2)).ison != $false,+a,+d) 2 2 &Whois $tree($dname,2) $cr nlist.command -u whois $tree($dname,2)
mdx.popd online $iif($notify($tree($dname,2)).ison == $false,+a,+d) 2 2 &Whowas $tree($dname,2) $cr nlist.command -u whowas $tree($dname,2)
mdx.popd online
mdx.popd online $iif($notify($tree($dname,2)).ison != $false,+a,+d) 3 3 &Query $tree($dname,2) $cr nlist.command -u query $tree($dname,2)
mdx.popd online $iif($notify($tree($dname,2)).ison != $false,+a,+d) 4 4 C&hat with $tree($dname,2) $cr nlist.command -u chat $tree($dname,2)
mdx.popd online +a 5 5 View/&Edit $+($tree($dname,2),'s) Profile $cr nlist.pro $tree($dname,2)
mdx.popd online $iif($nprofile($tree($dname,2),web) != $null,+a,+d) 9 9 Visit $+($tree($dname,2),'s) Website $cr run $nprofile($tree($dname,2),web)
mdx.popd online
mdx.popd online +a 6 6 &Refresh $cr nlist.list
mdx.popd online +a 7 7 &Clear List $cr nlist.all
mdx.popd online
mdx.popd online +> 8 8 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(online) | return
}
if (%tmp == Online) && ($tree($dname,2) != Online) {
mdx.new online 16 16
mdx.pop.set online bordericon emboss
mdx.pop.img online icon small $n.ico(nmenu.icl,2)
mdx.pop.img online icon small $n.ico(nmenu.icl,3)
mdx.pop.img online icon small $n.ico(nmenu.icl,4)
mdx.pop.img online icon small $n.ico(nmenu.icl,5)
mdx.pop.img online icon small $n.ico(nmenu.icl,6)
mdx.pop.img online icon small $n.ico(nmenu.icl,7)
mdx.pop.img online icon small $n.ico(nmenu.icl,12)
mdx.pop.img online icon small $n.ico(nmenu.icl,13)
mdx.pop.img online icon small $n.ico(nmenu.icl,8)
mdx.popd online +a 1 1 &Delete $tree($dname,2) $cr nlist.del $tree($dname,2)
mdx.popd online +a 2 2 &Whois $tree($dname,2) $cr nlist.command -n whois $tree($dname,2,$gettok($tree($dname,2).sel,1,32)) $tree($dname,2)
mdx.popd online
mdx.popd online +a 3 3 &Query $tree($dname,2) $cr nlist.command -n query $tree($dname,2,$gettok($tree($dname,2).sel,1,32)) $tree($dname,2)
mdx.popd online +a 4 4 C&hat with $tree($dname,2) $cr nlist.command -n chat $tree($dname,2,$gettok($tree($dname,2).sel,1,32)) $tree($dname,2)
mdx.popd online +a 5 5 View/&Edit $+($tree($dname,2),'s) Profile $cr nlist.pro $tree($dname,2)
mdx.popd online $iif($nprofile($tree($dname,2),web) != $null,+a,+d) 9 9 Visit $+($tree($dname,2),'s) Website $cr run $nprofile($tree($dname,2),web)
mdx.popd online
mdx.popd online +a 6 6 &Refresh $cr nlist.list
mdx.popd online +a 7 7 &Clear List $cr nlist.all
mdx.popd online
mdx.popd online +> 8 8 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(online) | return
}
if (%tmp == Offline) && ($tree($dname,2) != Offline) {
mdx.new offline 16 16
mdx.pop.set offline bordericon emboss
mdx.pop.img offline icon small $n.ico(nmenu.icl,2)
mdx.pop.img offline icon small $n.ico(nmenu.icl,3)
mdx.pop.img offline icon small $n.ico(nmenu.icl,6)
mdx.pop.img offline icon small $n.ico(nmenu.icl,7)
mdx.pop.img offline icon small $n.ico(nmenu.icl,12)
mdx.pop.img offline icon small $n.ico(nmenu.icl,13)
mdx.pop.img offline icon small $n.ico(nmenu.icl,8)
mdx.popd offline +a 1 1 &Delete $tree($dname,2) $cr nlist.del $tree($dname,2)
mdx.popd offline +a 2 2 &Whowas $tree($dname,2) $+ ... $cr nlist.command -n whowas $tree($dname,2,$gettok($tree($dname,2).sel,1,32)) $tree($dname,2)
mdx.popd offline
mdx.popd offline +a 3 3 View/&Edit $+($tree($dname,2),'s) Profile $cr nlist.pro $tree($dname,2)
mdx.popd offline $iif($nprofile($tree($dname,2),web) != $null,+a,+d) 7 7 Visit $+($tree($dname,2),'s) Website $cr run $nprofile($tree($dname,2),web)
mdx.popd offline
mdx.popd offline +a 4 4 &Refresh $cr nlist.list
mdx.popd offline +a 5 5 &Clear List $cr nlist.all
mdx.popd offline
mdx.popd offline +> 6 6 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(offline) | return
}
}
if ($tree($dname,2,$gettok($tree($dname,2).sel,1,32)) == Online) {
mdx.new online 16 16
mdx.pop.set online bordericon emboss
mdx.pop.img online icon small $n.ico(nmenu.icl,2)
mdx.pop.img online icon small $n.ico(nmenu.icl,3)
mdx.pop.img online icon small $n.ico(nmenu.icl,4)
mdx.pop.img online icon small $n.ico(nmenu.icl,5)
mdx.pop.img online icon small $n.ico(nmenu.icl,6)
mdx.pop.img online icon small $n.ico(nmenu.icl,7)
mdx.pop.img online icon small $n.ico(nmenu.icl,12)
mdx.pop.img online icon small $n.ico(nmenu.icl,13)
mdx.pop.img online icon small $n.ico(nmenu.icl,8)
mdx.popd online +a 1 1 &Delete $tree($dname,2) $cr nlist.del $tree($dname,2)
mdx.popd online +a 2 2 &Whois $tree($dname,2) $cr nlist.command -u whois $tree($dname,2)
mdx.popd online
mdx.popd online +a 3 3 &Query $tree($dname,2) $cr nlist.command -u query $tree($dname,2)
mdx.popd online +a 4 4 C&hat with $tree($dname,2) $cr nlist.command -u query $tree($dname,2)
mdx.popd online +a 5 5 View/&Edit $+($tree($dname,2),'s) Profile $cr nlist.pro $tree($dname,2)
mdx.popd online $iif($nprofile($tree($dname,2),web) != $null,+a,+d) 9 9 Visit $+($tree($dname,2),'s) Website $cr run $nprofile($tree($dname,2),web)
mdx.popd online
mdx.popd online +a 6 6 &Refresh $cr nlist.list
mdx.popd online +a 7 7 &Clear List $cr nlist.all
mdx.popd online
mdx.popd online +> 8 8 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(online) | return
}
if ($tree($dname,2,$gettok($tree($dname,2).sel,1,32)) == Offline) {
mdx.new offline 16 16
mdx.pop.set offline bordericon emboss
mdx.pop.img offline icon small $n.ico(nmenu.icl,2)
mdx.pop.img offline icon small $n.ico(nmenu.icl,3)
mdx.pop.img offline icon small $n.ico(nmenu.icl,4)
mdx.pop.img offline icon small $n.ico(nmenu.icl,7)
mdx.pop.img offline icon small $n.ico(nmenu.icl,12)
mdx.pop.img offline icon small $n.ico(nmenu.icl,13)
mdx.pop.img offline icon small $n.ico(nmenu.icl,8)
mdx.popd offline +a 1 1 &Delete $tree($dname,2) $cr nlist.del $tree($dname,2)
mdx.popd offline +a 2 2 &Whowas $tree($dname,2) $+ ... $cr nlist.command -u whowas $tree($dname,2)
mdx.popd offline
mdx.popd offline +a 3 3 View/&Edit $+($tree($dname,2),'s) Profile $cr nlist.pro $tree($dname,2)
mdx.popd offline $iif($nprofile($tree($dname,2),web) != $null,+a,+d) 7 7 Visit $+($tree($dname,2),'s) Website $cr run $nprofile($tree($dname,2),web)
mdx.popd offline
mdx.popd offline +a 4 4 &Refresh $cr nlist.list
mdx.popd offline +a 5 5 &Clear List $cr nlist.all
mdx.popd offline
mdx.popd offline +> 6 6 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(offline) | return
}
if ($tree($dname,2) == $null) {
mdx.new nlist 16 16
mdx.pop.set nlist bordericon emboss
mdx.pop.img nlist icon small $n.ico(nmenu.icl,1)
mdx.pop.img nlist icon small $n.ico(nmenu.icl,7)
mdx.pop.img nlist icon small $n.ico(nmenu.icl,12)
mdx.pop.img nlist icon small $n.ico(nmenu.icl,13)
mdx.popd nlist +a 1 1 &Add Buddy.. $cr nlist.pro new
mdx.popd nlist
mdx.popd nlist +a 2 2 &Refresh $cr nlist.list
mdx.popd nlist +a 3 3 &Clear List $cr nlist.all
mdx.popd nlist
mdx.popd nlist +> 4 4 &View... $cr nview
mdx.new nview 16 16
mdx.pop.set nview bordericon emboss
mdx.pop.img nview icon small $n.ico(nmenu.icl,9)
mdx.pop.img nview icon small $n.ico(nmenu.icl,14)
mdx.pop.img nview icon small $n.ico(nmenu.icl,15)
mdx.pop.img nview icon small $n.ico(nmenu.icl,13)
mdx.popd nview $iif($nconf(nlist.view) == networks,+x,+a) 1 1 &Networks Tree $cr nlist.view networks
mdx.popd nview $iif($nconf(nlist.view) == onoff,+x,+a) 2 2 &Online && Offline Buddies Tree $cr nlist.view onoff
mdx.popd nview $iif($nconf(nlist.view) == online,+x,+a) 3 3 &Buddies Tree Only $cr nlist.view online
mdx.popd nview
mdx.popd nview $iif($nconf(nlist.pop) == on,+x,+a) 4 4 Notify &Popup Window $cr nlist.pop
$mdx.menu(nlist) | return
}
}
}
if ($devent == init) {
dll $mdx MarkDialog nlist | dll $mdx SetControlMDX nlist 2 treeview haslines hasbuttons showsel linesatroot > $mdx(views)
did -i nlist 2 1 iconsize normal small
did -i nlist 2 1 seticon normal 0 $n.ico(nlist.icl,0)
did -i nlist 2 1 seticon normal 0 $n.ico(nlist.icl,1)
did -i nlist 2 1 seticon normal 0 $n.ico(nlist.icl,2)
did -i nlist 2 1 seticon normal 0 $n.ico(nlist.icl,3)
did -i nlist 2 1 seticon normal 0 $n.ico(nlist.icl,4)
nlist.list
}
}
dialog nlist.profile {
title "Profile"
size 308 72 252 296
icon $ico(nmenu.icl), 0
box "", 1, 0 -4 252 300
button "&Cancel", 2, 115 272 65 20, flat cancel
button "&Done", 3, 182 272 65 20, flat ok default
icon 4, 214 49 32 32, $ico(nmenu.icl), 0
text "Nickname:", 5, 5 6 51 16
edit "", 6, 3 20 209 21, autohs
text "Real Name:", 7, 4 43 57 16
edit "", 8, 3 56 208 21, autohs
text "Street Address:", 9, 5 79 78 16
edit "", 10, 3 94 208 21, autohs
text "Phone:", 11, 5 119 35 16
edit "", 12, 39 116 80 21, autohs
text "Mobile:", 13, 132 120 34 16
edit "", 14, 168 116 80 21, autohs
text "MSN:", 15, 5 142 27 16
edit "", 16, 39 138 209 21, autohs
text "Additional Notes:", 17, 6 203 84 16
edit "", 18, 3 217 245 54, multi autovs vsbar limit 150
text "Web:", 19, 5 164 28 16
edit "", 20, 39 160 209 21, autohs
text "Email:", 21, 5 186 31 16
edit "", 22, 39 182 209 21, autohs
}
on *:dialog:npro.*:*:*:{
if ($devent == sclick) {
if ($did == 3) && ($did($dname,6).text != $null) {
var %line = 0,%nnick = $gettok($did($dname,6).text,1,32),%note
nprofile %nnick nick %nnick
nprofile %nnick name $did($dname,8).text
nprofile %nnick address $did($dname,10).text
nprofile %nnick phone $did($dname,12).text
nprofile %nnick mobile $did($dname,14).text
nprofile %nnick msn $did($dname,16).text
nprofile %nnick web $did($dname,20).text
nprofile %nnick email $did($dname,22).text
while (%line < $did($dname,18).lines) {
inc %line 1
%note = %note $did($dname,18,%line)
}
nprofile %nnick note %note | nlist.add %nnick %noe
}
}
if ($devent == init) {
if ($gettok($dname,2,46) != new) {
var %nnick = $gettok($dname,2,46)
did -a $dname 6 %nnick
did -a $dname 8 $nprofile(%nnick,name)
did -a $dname 10 $nprofile(%nnick,address)
did -a $dname 12 $nprofile(%nnick,phone)
did -a $dname 14 $nprofile(%nnick,mobile)
did -a $dname 16 $nprofile(%nnick,msn)
did -a $dname 18 $nprofile(%nnick,note)
did -a $dname 20 $nprofile(%nnick,web)
did -a $dname 22 $nprofile(%nnick,email)
}
did -f $dname 6
}
}
;
;Aliases
alias nlist { if (!$dialog(nlist)) { dialog -m nlist nlist } }
alias nlist.pro {
if (!$dialog(npro. [ $+ [ $1 ] ])) { dialog -m npro. [ $+ [ $1 ] ] nlist.profile
if ($1 == new) { dialog -t npro. [ $+ [ $1 ] ] $strip($slogo) - New Profile | return }
dialog -t npro. [ $+ [ $1 ] ] $strip($slogo) - $+($1,'s) Profile..
}
}
alias -l nlist.view { nconf nlist.view $1 | nlist.list }
alias -l nlist.pop {
if ($nconf(nlist.pop) == on) { nconf nlist.pop off | return }
if ($nconf(nlist.pop) != on) { nconf nlist.pop on | return }
}
alias -l nconf {
if ($isid) { return $readini($sys(nlist.ini),main,$1) }
writeini -n $sys(nlist.ini) main $1 $2-
}
alias nprofile {
if ($isid) { return $readini($sys(nlist.ini),$1,$2) }
if ($3-) { writeini -n $sys(nlist.ini) $1 $2 $3- }
}
alias -l nlist.del { .remini $sys(nlist.ini) $1 | .notify -r $1 | nlist.list }
alias -l nlist.list {
var %net = 0,%user = 0 | did -r nlist 2
;Networks Tree
if ($nconf(nlist.view) == networks) {
did -i nlist 2 1 cb root
while (%net < $scon(0).network) {
inc %net 1 | did -a nlist 2 +eb 1 1 $scon(%net).network | did -i nlist 2 1 cb $calc(%net + 1) | did -a nlist 2 +eb 2 2 Online
;Online
scon %net | %user = 0 | did -i nlist 2 1 cb 2 | while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison != $false) { did -a nlist 2 4 4 $notify(%user) } }
did -i nlist 2 1 cb root $calc(%net + 1) | did -a nlist 2 +eb 3 3 Offline | did -i nlist 2 1 cb 3 | %user = 0
;Offline
while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison == $false) { did -a nlist 2 5 5 $notify(%user) } }
did -i nlist 2 1 cb root 1
}
}
;Online/Offline Tree
if ($nconf(nlist.view) == onoff) {
%user = 0 | did -i nlist 2 1 cb root | did -a nlist 2 +eb 2 2 Online | did -i nlist 2 1 cb 2
;Online
while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison != $false) { did -a nlist 2 4 4 $notify(%user) } }
did -i nlist 2 1 cb root 1 | did -a nlist 2 +eb 3 3 Offline | did -i nlist 2 1 cb 3 | %user = 0
;Offline
while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison == $false) { did -a nlist 2 5 5 $notify(%user) } }
}
;Buddies Tree Only
if ($nconf(nlist.view) == online) {
;Online
%user = 0 | did -i nlist 2 1 cb root | while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison != $false) { did -a nlist 2 4 4 $notify(%user) | did -i nlist 2 1 cb root 1 } }
;Offline
%user = 0 | while (%user < $notify(0)) { inc %user 1 | if ($notify(%user).ison == $false) { did -a nlist 2 5 5 $notify(%user) | did -i nlist 2 1 cb root 1 } }
}
}
alias -l nlist.add { .notify -r $1 | .notify $1 $2- | nlist.list }
alias -l nlist.all {
var %dec = $notify(0) | while (%dec > 0) { .remini $sys(nlist.ini) $notify(%dec) | .notify -r $notify(%dec) | dec %dec 1 }
nlist.list
}
alias -l nlist.window {
if (!$window(@nlist. [ $+ [ $1 ] ])) && ($nconf(nlist.pop) == on) {
var %tmp = $nlist.pos | window -phdo +dL @nlist. [ $+ [ $1 ] ] $calc($window(-1).w - 254) %tmp 252 52
%nlist.win = $window(@nlist. [ $+ [ $1 ] ]).wid | drawpic -c @nlist. [ $+ [ $1 ] ] 0 0 $ico(notify.bmp)
drawtext -or @nlist. [ $+ [ $1 ] ] $rgb(10,10,10) Tahoma 13 42 5 $lower($left($2,27))
drawtext -r @nlist. [ $+ [ $1 ] ] $rgb(200,200,200) Tahoma 11 44 19 network: $lower($left($3,31))
if ($4) { drawtext -r @nlist. [ $+ [ $1 ] ] $rgb(200,200,200) Tahoma 11 44 30 $lower($left($4-,39)) }
.timer.notify.win. [ $+ [ $1 ] ] 1 9 window -c @nlist. [ $+ [ $1 ] ]
}
}
alias -l nlist.pos {
var %dec = $window(0)
while (%dec > 0) {
if ($gettok($window(%dec),1,46) == @nlist) && ($window(%dec).wid == %nlist.win) { return $calc($window(%dec).y + 52) }
dec %dec 1
}
return 70
}
alias nlist.command {
; /nlist.command -n[network]|-u[user] <whois|query|chat> [<network>|<nick>]
if ($2 == whois) { scon $nlist.network($1,$3) whois $iif($1 == -n,$4,$3) }
if ($2 == whowas) { scon $nlist.network($1,$3) whowas $iif($1 == -n,$4,$3) }
if ($2 == query) { scon $nlist.network($1,$3) query $iif($1 == -n,$4,$3) }
if ($2 == chat) { scon $nlist.network($1,$3) dcc chat $iif($1 == -n,$4,$3) }
}
alias nlist.network {
; $nlist.network(-n[network]|-u[user],networkname|nick)
var %scon = 0
if ($1 == -n) && ($2) {
while (%scon < $scon(0)) {
inc %scon 1
if ($scon(%scon).network == $2) { return %scon }
}
return 1
}
if ($1 == -u) && ($2) {
while (%scon < $scon(0)) {
inc %scon 1
scon %scon
if ($notify($2).ison != $false) { return %scon }
}
return 1
}
}
alias -l mdx {
if ($1 == views) { return $shortfn($scriptdirmdx\views.mdx) }
return $shortfn($scriptdirmdx\mdx.dll)
}
alias -l mdx.new { dll $shortfn($scriptdirmdx\popups.dll) New $1- }
alias -l mdx.pop.set { dll $shortfn($scriptdirmdx\popups.dll) SetStyle $1- }
alias -l mdx.pop.img { dll $shortfn($scriptdirmdx\popups.dll) LoadImg $1- }
alias -l mdx.popd { dll $shortfn($scriptdirmdx\popups.dll) AddItem $1 end $2- }
alias -l mdx.menu {
var %tmp = $dll($shortfn($scriptdirmdx\popups.dll),Popup,$1 + $mouse.dx $mouse.dy)
if ($gettok(%tmp,1,32) == OK) { return $gettok(%tmp,4-,32) }
}
alias -l slogo { return DiGiTaL }
alias -l sys { return $shortfn($scriptdir\ [ $+ [ $1- ] ]) }
alias -l ico { return $shortfn($scriptdiricons\ [ $+ [ $1- ] ]) }
alias -l n.ico { return $2 $+ $chr(44) $+ $shortfn($+($scriptdiricons\,$1)) }
alias -l tree {
; Yochai Timmer
var %dialog = $1
var %id = $2
if (!$dialog(%dialog)) return
if ($3) {
var %Loc = $3-
if ($prop = lines) {
did -i %dialog %id 1 cb root %loc
return $calc($did(%dialog,%id,0).lines -1)
}
if ($numtok(%Loc,32) = 1) { did -i %dialog %id 1 cb root }
else { did -i %dialog %id 1 cb root $gettok(%loc,1- $+ $calc($numtok(%loc,32) -1),32) }
var %line = $gettok($did(%dialog,%id,$gettok(%Loc,-1,32)),7-,32)
if ($prop = tooltip) { return $gettok(%line,2-,9) }
return $gettok(%line,1,9)
}
var %entry = $did(%dialog,%id,1)
if ($gettok(%entry,1,32) = slclick) { var %loc = $gettok(%entry,4-,32) }
else { var %loc = $gettok(%entry,3-,32) }
var %depth = $calc($numtok(%loc,32) -1)
var %branch = $gettok(%loc,-1,32)
if (%depth = 0) { did -i %dialog %id 1 cb root }
else { did -i %dialog %id 1 cb root $gettok(%loc,1- $+ %depth,32) }
var %line = $gettok($did(%dialog,%id,%branch),7-,32)
if (!$prop) { return $gettok(%line,1,9) }
if ($prop = root) { return $gettok(%loc,1,32) }
if ($prop = sel) { return %loc }
if ($prop = lines) { return $calc($did(%dialog,%id,0).lines -1) }
if ($prop = len) { return $len(%line) }
if ($prop = tooltip) { return $gettok(%line,2-,9) }
if ($prop = event) { return $gettok(%entry,1,32) }
}
;
;Events
on *:NOTIFY:{ nlist.window $nick $+($nick,$chr(40),$address,$chr(41)) $network $notify($notify($nick)).note | if ($dialog(nlist)) { nlist.list } }
on *:UNOTIFY:{ if ($dialog(nlist)) { nlist.list } }
on *:DISCONNECT:{ if ($dialog(nlist)) { nlist.list } }
;
;Menus
menu channel {
&Notify List
.&Notify List:nlist
.-
.&View Readme:run notepad $shortfn($scriptdirreadme.txt)
}
menu menubar {
&Notify List
.&Notify List:nlist
.-
.&View Readme:run notepad $shortfn($scriptdirreadme.txt)
}
menu status {
&Notify List
.&Notify List:nlist
.-
.&View Readme:run notepad $shortfn($scriptdirreadme.txt)
}