Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:START:{
- .timerhash 1 1 hmake -s xdccv 9999 | dcc packetsize 65535 | fsend on | pdcc on
- } // Cleaned up the code
- alias xdccv if (!$dialog(xdccv)) dialog -md xdccv xdccv
- alias addpacket {
- ; /addpacket [nick] [packet N] [line]
- if (!$3) halt
- hadd xdccv $+($1,_,$remove($2,$chr(35))) $3-
- if ($dialog(xdccv)) && (!$didwm(xdccv,27,$1,1)) did -a xdccv 27 $1
- }
- alias xpack {
- ; this determines if the text is a text line or an xdcc pack
- ; you can add your own, you better know how to script though...
- ; if you find an xdcc match, you HAVE to 'return packN [text]'
- tokenize 32 $strip($1-)
- ; iroffer
- ; #1 14x [ 50M] a_file.zip
- ;
- var %format = #?* [*?*] *
- if (%format iswm $1-) {
- if (*x iswm $2) tokenize 32 $1 $3-
- if ([*] iswm $2-3) tokenize 32 $1 $2 $+ $3-
- var %pack = $regex($1,^(#|)[0-9]+$)
- if (!%pack) return 0
- return $remove($1,$chr(35)) $3-
- }
- ; eirc xdcc
- ; #1 arg.exe :: description
- ;
- var %format = #?* *?* :: *?*
- if (%format iswm $1-) {
- var %pack = $regex($1,^(#|)[0-9]+$)
- if (!%pack) return 0
- return $remove($1,$chr(35)) $2-
- }
- ; ? xdcc (if you know what it's from tell me, polaris maybe?)
- ; [#13] (0x|639.8Mb) - blahhh.iso
- ;
- var %format = [#*] (*x|*b) - *
- if (%format iswm $1-) {
- var %pack = $regex($1,^\[(#|)[0-9]+\]$)
- if (!%pack) return 0
- return $remove($1,[,],$chr(35)) $4-
- }
- }
- dialog xdccv {
- title "File Viewer"
- size -1 -1 913 588 // Increased width and height by 25%
- box "Bots", 1, 6 6 200 531 // Adjusted box dimensions
- button "OK", 2, 714 548 94 31, ok // Adjusted button positions and sizes
- button "Cancel", 3, 813 548 94 31, cancel // Adjusted button positions and sizes
- box "Packs", 4, 211 6 694 531 // Adjusted box dimensions
- list 27, 14 25 184 504, size sort extsel hsbar vsbar // Adjusted list dimensions
- list 28, 220 25 674 502, size sort extsel hsbar vsbar // Adjusted list dimensions
- menu "File", 5
- item "Open...", 34, 5
- item "Open new...", 8, 5
- item "Save as...", 9, 5
- item break, 10, 5
- item Exit, 11, 5
- menu "Packets",29
- item "Request download",30,29
- item break,31,29
- item "Copy selected",32,29
- item "Copy list",33,29
- menu "About", 22
- item "Help...", 23, 22
- item break, 24, 22
- item About..., 25, 22
- button Search...,35, 6 548 94 31 //adjusted button position and size
- button "Flush List", 12, 113 548 94 31 //adjusted button position and size
- }
- on *:dialog:xdccv:sclick:35:xdccs
- on *:dialog:xdccv:menu:32:clipboard $$did($dname,28).seltext
- on *:dialog:xdccv:menu:33:clipboard $$did($dname,28,1) $+ $crlf | var %a = 2 | while ($did($dname,28,%a)) { clipboard -a $ifmatch $+ $crlf | inc %a }
- on *:dialog:xdccv:menu:8:hdel -w xdccv * | hload xdccv " $+ $$sfile(*.xdc,Select file) $+ " | dialog -x $dname | xdccv
- on *:dialog:xdccv:menu:34:hload xdccv " $+ $$sfile(*.xdc,Select file) $+ " | dialog -x $dname | xdccv
- on *:dialog:xdccv:menu:9:hsave -o xdccv " $+ $$sfile(xdcc-list.xdc,Select file,Save) $+ "
- on *:dialog:xdccv:sclick:12:hdel -w xdccv * | did -r $dname 27,28
- on *:dialog:xdccv:menu:11:dialog -x $dname
- on *:dialog:xdccv:menu:23:help
- on *:dialog:xdccv:menu:25:return $input(XDCC Viewer v2.1 $crlf $+ by Eric^^ $crlf $+ $crlf Thanks to: $crlf dohcan - dstudio,124)
- on *:dialog:xdccv:dclick:28:var %msg = $$did($dname,27).seltext xdcc send $+($chr(35),$calc($gettok($gettok($$did($dname,28).seltext,1,32),1,46))) | ctcp %msg | if ($network == Dalnet) /dccallow $+(+,$$did($dname,27))
- on *:dialog:xdccv:menu:30:var %msg = $$did($dname,27).seltext xdcc send $+($chr(35),$calc($gettok($gettok($$did($dname,28).seltext,1,32),1,46))) | ctcp %msg | if ($network == Dalnet) /dccallow $+(+,$$did($dname,27))
- on *:dialog:xdccv:menu:14:var %msg = $$did($dname,27).seltext xdcc list | ctcp %msg
- on *:dialog:xdccv:menu:13:var %nick = $$did($dname,27).seltext | did -d $dname 27 $did($dname,27).sel | hdel -w xdccv $+(%nick,_*)
- on *:dialog:xdccv:init:*:var %a = 1 | while ($hget(xdccv,%a).item) { var %name = $ifmatch | if (!$didwm($dname,27,$gettok(%name,1- $+ $calc($numtok(%name,95) -1),95),1)) did -a $dname 27 $gettok(%name,1- $+ $calc($numtok(%name,95) -1),95) | inc %a }
- on *:dialog:xdccv:sclick:27:did -r $dname 28 | var %a = 1 | while ($hmatch(xdccv,$+($did($dname,27).seltext,_*),%a)) { did -a $dname 28 $right(0000 $+ $gettok($ifmatch,$numtok($ifmatch,95),95),4) $+ . $hget(xdccv,$ifmatch) | inc %a }
- on *:text:*:*:if ($xpack($1-)) addpacket $nick $ifmatch
- on *:notice:*:*:if ($xpack($1-)) addpacket $nick $ifmatch
- dialog xdccs {
- title "Search File Database"
- size -1 -1 800 500
- box "Search", 1, 10 5 780 30 // Adjusted y coordinate to 5
- edit "", 2, 20 35 650 30, selected // Adjusted edit y coordinate
- button "Search", 3, 680 35 100 30, default // Adjusted button y coordinate
- box "Results", 4, 10 70 780 30 // Adjusted y coordinate to 70
- list 5, 10 100 780 355, size // Adjusted list y coordinate
- button "OK", 6, 690 460 100 30, ok
- button "Viewer", 36, 10 460 100 30
- }
- on *:dialog:xdccs:sclick:36:xdccv
- on *:dialog:xdccs:dclick:5:ctcp $gettok($did($dname,5).seltext,1,32) xdcc send $gettok($did($dname,5).seltext,2,58) | if ($network == Dalnet) dccallow $+(+,$gettok($did($dname,5).seltext,1,32))
- on *:dialog:xdccs:sclick:3:{
- did -r $dname 5
- var %a = 1
- while ($hget(xdccv,%a).item) {
- var %item = $ifmatch,%value = $hget(xdccv,%item),%pack = $gettok(%item,$numtok(%item,95),95),%name = $gettok(%item,1- $+ $calc($numtok(%item,95) -1),95)
- if (* $+ $replace($did($dname,2),$chr(32),*) $+ * iswm %value) did -a $dname 5 %name : $chr(35) $+ %pack : %value
- inc %a
- }
- }
- alias xdccs if (!$dialog(xdccs)) dialog -md xdccs xdccs
- -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement