alias -l pac_cinstall { sockclose pac_ckinst sockopen pac_ckinst dl.dropbox.com 80 write -c $qt($scriptdirupdate.pac) } on *:sockopen:pac_ckinst:{ if (!$sockerr) sockwrite $sockname GET /u/4249275/Pacman/update.pac HTTP/1.0 $+ $str($crlf,2) } on *:sockread:pac_ckinst:{ if ($sock($sockname).mark) { sockread -f &a bwrite $qt($scriptdirupdate.pac) -1 -1 &a } else { var %a sockread %a if (%a == $null) sockmark $sockname 1 } } on *:sockclose:pac_ckinst:pac_install alias -l pac_install { if (!$isdir($scriptdirpacman)) mkdir $qt($scriptdirpacman) if (!$isdir($scriptdirpacman\maps)) mkdir $qt($scriptdirpacman\maps) var %a 2 while ($read($scriptdirupdate.pac,tn,%a)) { pac_dl_install %a $v1 | inc %a } set %pacinstall %a - 2 .remove $qt($scriptdirupdate.pac) } alias -l pac_dl_install { sockclose pac_install $+ $1 sockopen pac_install $+ $1 dl.dropbox.com 80 sockmark pac_install $+ $1 $2- } on *:sockopen:pac_install?*:{ if (!$sockerr) { .fopen -no $sockname $qt($scriptdirpacman\ $+ $sock($sockname).mark) sockwrite $sockname GET $+(/u/4249275/Pacman/,$sock($sockname).mark HTTP/1.1,$crlf,Host: dl.dropbox.com,$crlf,Connection: close,$str($crlf,2)) sockmark $sockname } } on *:sockread:pac_install?*:{ if ($sock($sockname).mark) { sockread -f &a .fwrite -b $sockname &a } else { var %a sockread %a if (%a == $null) sockmark $sockname 1 } } on *:sockclose:pac_install?*:{ var %f $fopen($sockname).fname dec %pacinstall .fclose $sockname if ($right(%f,4) == .mrc) .reload -rs $qt(%f) if (!%pacinstall) { unset %pacinstall | .remove $qt($scriptdirupdate.pac) | .timer 1 1 pacman $!input(Install complete,o,Pacman - Install) | .remove $qt($script) | .unload -rs $qt($script) } } menu channel,menubar,query,status { Pacman : pacman } alias Pacman pac_cinstall