UnderIRC — File Browser
UnderIRCv1.0 / UnderIRCv1.0 / Under / System / script2.ini
script2.ini — 10.76 KB — Download this file
[script]
n0=dialog nc.pro {
n1= title "NiCK COMPLETiON"
n2= size -1 -1 370 250
n3= button "OK", 1, 230 215 110 20, OK
n4= box "", 3, 5 5 155 80
n5= box "", 4, 5 85 155 80
n6= box "", 5, 170 5 190 160
n7= box "", 6, 5 165 355 35
n8= box "", 106, 5 200 200 44
n9=
n10= text "LEFT:", 9, 20 20 100 18
n11= edit "", 10, 115 17 40 22, autohs
n12= check "COLOR", 11, 20 40 60 18
n13= check "BACKGROUNd", 51, 20 60 95 18
n14= icon 41, 115 43 13 13
n15= icon 81, 115 65 13 13
n16=
n17= text "RiGHT:", 13, 20 100 105 18
n18= edit "", 14, 115 97 40 22, autohs
n19= check "COLOR", 15, 20 120 60 18
n20= check "BACKGROUNd", 55, 20 140 95 18
n21= icon 42, 115 123 13 13
n22= icon 82, 115 143 13 13
n23=
n24= text "NiCK:", 16, 185 20 100 18
n25= check "BOLD", 17, 185 40 55 20
n26= check "UNDERLiNE", 18, 185 60 80 20
n27= check "REVERSE", 19, 185 80 70 20
n28= radio "EFFECT 1", 20, 280 40 70 20, group
n29= radio "EFFECT 2", 21, 280 60 70 20
n30= radio "EFFECT 3", 22, 280 80 70 20
n31= check "COLOR", 23, 185 115 70 18
n32= icon 43, 280 117 13 13
n33= check "BACKGROUNd", 24, 185 135 95 18
n34= icon 44, 280 137 13 13
n35=
n36= check "NiCK COMPLETiON ENABLEd", 25, 20 177 170 20
n37= text "ACTiVATOR(s) :", 26, 220 180 80 18
n38= edit "", 27, 305 177 40 20
n39=
n40= icon 45, 10 211 110 26
n41= button "PREViEW", 28, 125 214 70 20
n42=
n43=}
n44=
n45=dialog nc.colors {
n46= title "COLORS"
n47= size -1 -1 170 90
n48= button "OK", 20, 1 1 1 1, OK, hide
n49= box "CHOOSE THE COLOR", 21, 5 10 160 70
n50= icon 1, 20 35 14 14
n51= icon 2, 37 35 14 14
n52= icon 3, 54 35 14 14
n53= icon 4, 71 35 14 14
n54= icon 5, 88 35 14 14
n55= icon 6, 105 35 14 14
n56= icon 7, 121 35 14 14
n57= icon 8, 137 35 14 14
n58= icon 9, 20 55 14 14
n59= icon 10, 37 55 14 14
n60= icon 11, 54 55 14 14
n61= icon 12, 71 55 14 14
n62= icon 13, 88 55 14 14
n63= icon 14, 105 55 14 14
n64= icon 15, 121 55 14 14
n65= icon 16, 137 55 14 14
n66=}
n67=
n68=on *:dialog:*:*:*: {
n69= if ($dname == nc.pro) {
n70= if ($devent == init) {
n71= nc.draw
n72= if (%ncpro-left != $null) { did -ca $dname 10 %ncpro-left }
n73= if (%ncpro-right != $null) { did -ca $dname 14 %ncpro-right }
n74= if (%ncpro-ativa == $null) { set %ncpro-ativa - } | did -ca $dname 27 %ncpro-ativa
n75= if (%ncpro-c-11) { did -c $dname 11 } | if (%ncpro-c-51) { did -c $dname 51 }
n76= if (%ncpro-c-15) { did -c $dname 15 } | if (%ncpro-c-55) { did -c $dname 55 }
n77= if (%ncpro-c-23) { did -c $dname 23 } | if (%ncpro-c-24) { did -c $dname 24 }
n78= if (%ncpro-on) { did -c $dname 25 }
n79= if (%ncpro-mid > 3) { did -c $dname $calc(%ncpro-mid + 16) }
n80= else {
n81= if ($gettok(%ncpro-mid,1,32)) { did -c $dname 17 }
n82= if ($gettok(%ncpro-mid,2,32)) { did -c $dname 18 }
n83= if ($gettok(%ncpro-mid,3,32)) { did -c $dname 19 }
n84= }
n85= }
n86= if ($devent == edit) {
n87= if ($did == 10) { unset %ncpro-left | if ($did(10)) { set %ncpro-left $did(10) } }
n88= if ($did == 14) { unset %ncpro-right | if ($did(14)) { set %ncpro-right $did(14) } }
n89= if ($did == 27) { if ($did(27)) { set %ncpro-ativa $did(27) } | else { set %ncpro-ativa - } }
n90= }
n91= if ($devent == sclick) {
n92= if ($did == 2) { ncpro.hlp } | if ($did == 28) { nc.preview }
n93= if ($did isnum 41-44) || ($did isnum 81-82) { nc.cor -gv $dname $did }
n94= if ($did == 25) { set %ncpro-on $did(25).state }
n95= if ($findtok(11 51 15 55 23 24,$did,32)) { set %ncpro-c- [ $+ [ $did ] ] $did($did).state }
n96= if ($did isnum 17-19) {
n97= if ($did(20).state) || ($did(21).state) || ($did(22).state) {
n98= did -u $dname 20 | did -u $dname 21 | did -u $dname 22
n99= }
n100= set %ncpro-mid $did(17).state $did(18).state $did(19).state
n101= }
n102= if ($did isnum 20-22) {
n103= if ($did(17).state) || ($did(18).state) || ($did(19).state) {
n104= did -u $dname 17 | did -u $dname 18 | did -u $dname 19
n105= }
n106= set %ncpro-mid $calc($did - 16)
n107= }
n108= }
n109= }
n110= if ($dname == nc.colors) {
n111= if ($devent == init) { nc.colors }
n112= if ($devent == sclick) {
n113= if ($calc($did - 1) isnum 0-15) {
n114= set %nc.file system\ncbmps\ $+ $calc($did - 1) $+ .bmp
n115= if ($isfile(%nc.file)) && ($dialog(%nc.dlg)) {
n116= did %nc.pars %nc.dlg %nc.did %nc.file | set %ncpro-c- [ $+ [ %nc.did ] ] $calc($did - 1) | dialog -k $dname
n117= }
n118= }
n119= }
n120= }
n121=}
n122=
n123=alias -l nc.preview {
n124= if ($dialog(nc.pro)) {
n125= window -hp +f @nc.preview 0 0 110 26 | clear @nc.preview
n126= if ($isfile(system\ncpreview.bmp)) { .remove system\ncpreview.bmp }
n127= drawfill -r @nc.preview $rgb(face) $rgb(face) 0 0 | drawtext -pb @nc.preview $colour(own) $colour(back) Arial 15 35 3 $chr(160) $ncstyle(nick) $chr(160)
n128= drawsave @nc.preview system\ncpreview.bmp | window -c @nc.preview
n129= did -gv nc.pro 45 system\ncpreview.bmp
n130= }
n131=}
n132=
n133=alias ncpro { if ($dialog(nc.pro)) { return } | dialog -m nc.pro nc.pro }
n134=
n135=on *:input:#: { if ($right($1,1) isin $remove(%ncpro-ativa,$chr(32))) && (%ncpro-on) { ncomp $1- | return } }
n136=
n137=alias -l ncomp {
n138= set %ncpro-nick $1 | set %ncpro-nick $remove($1,$right(%ncpro-nick,1)) | unset %ncpro-nicks | set %ncpro-chan $active | set %ncpro-msg $2-
n139= if (%ncpro-chan !ischan) || (%ncpro-nick == $null) || (%ncpro-msg == $null) { return }
n140= set %nc.i 0 | :inck | inc %nc.i 1
n141= if (%nc.i > $nick(%ncpro-chan,0)) { goto fim }
n142= if ( [ %ncpro-nick ] isin [ $nick(%ncpro-chan,%nc.i) ] ) || ( [ %ncpro-nick ] iswm [ $nick(%ncpro-chan,%nc.i) ] ) {
n143= set %ncpro-nicks %ncpro-nicks $nick(%ncpro-chan,%nc.i)
n144= }
n145= goto inck
n146= :fim
n147= if ($gettok(%ncpro-nicks,1,32) !ison %ncpro-chan) { /msg %ncpro-chan $1- | halt }
n148= if ($gettok(%ncpro-nicks,2,32) ison %ncpro-chan) {
n149= window -c @NiCKs | window -kl +ntbs @NiCKs $nc.center(180,200) @NiCKs arial 11
n150= aline @NiCKs $chr(160) $+ -=-=-=- NiCK COMPLETiON -=-=-=-
n151= aline @NiCKs MORE THAN ONE NiCK MATCHES.
n152= aline @NiCKs $chr(160) $chr(160) [ double click the correct nick ]
n153= aline @NiCKs $chr(160)
n154= set %ncpro-i 0 | :incgt | inc %ncpro-i 1
n155= if ($gettok(%ncpro-nicks,%ncpro-i,32) == $null) { goto msg }
n156= aline @NiCKs $gettok(%ncpro-nicks,%ncpro-i,32) | goto incgt
n157= :msg | window -b @NiCKs | halt
n158= }
n159= else { /msg %ncpro-chan $ncstyle(%ncpro-nicks) %ncpro-msg | halt }
n160= halt
n161=}
n162=
n163=alias -l ncstyle {
n164= if ($1 != $null) {
n165= unset %-nc-*
n166= if (%ncpro-c-11) {
n167= if (%ncpro-c-41 isnum 0-15) {
n168= set %-nc-c1 %ncpro-c-41 | if (%ncpro-c-81 isnum 0-15) && (%ncpro-c-51) { set %-nc-c1 %-nc-c1 $+ , $+ %ncpro-c-81 }
n169= }
n170= }
n171= if (%ncpro-c-15) {
n172= if (%ncpro-c-42 isnum 0-15) {
n173= set %-nc-c2 %ncpro-c-42 | if (%ncpro-c-82 isnum 0-15) && (%ncpro-c-55) { set %-nc-c2 %-nc-c2 $+ , $+ %ncpro-c-82 }
n174= }
n175= }
n176= if (%ncpro-c-23) {
n177= if (%ncpro-c-43 isnum 0-15) {
n178= set %-nc-c3 %ncpro-c-43 | if (%ncpro-c-44 isnum 0-15) && (%ncpro-c-24) { set %-nc-c3 %-nc-c3 $+ , $+ %ncpro-c-44 }
n179= }
n180= }
n181= set %-nc-e $1
n182= if ($gettok(%ncpro-mid,0,32) < 3) {
n183= if (%ncpro-mid == 4) { set %-nc-e $_nc-e1($1) } | if (%ncpro-mid == 5) { set %-nc-e $_nc-e2($1) }
n184= if (%ncpro-mid == 6) { set %-nc-e $_nc-e3($1) }
n185= }
n186= else {
n187= if ($gettok(%ncpro-mid,1,32)) { set %-nc-e $+ %-nc-e } | if ($gettok(%ncpro-mid,2,32)) { set %-nc-e $+ %-nc-e }
n188= if ($gettok(%ncpro-mid,3,32)) { set %-nc-e $+ %-nc-e }
n189= }
n190= set %-nc-e $+ %-nc-c3 $+ %-nc-e $+
n191= if (%ncpro-left) { set %-nc-e $+ %-nc-c1 $+ %ncpro-left $+ $+ %-nc-e } | if (%ncpro-right) { set %-nc-e %-nc-e $+ $+ %-nc-c2 $+ %ncpro-right $+ }
n192= }
n193= .timer -m 1 100 unset %-nc-* | return %-nc-e
n194=}
n195=
n196=alias -l _nc-e1 { if ($len($1) < 3) { return $+ $1 $+ } | return $+ $left($1,1) $+ $+ $mid($1,2,$calc($len($1) - 2)) $+ $+ $right($1,1) $+ }
n197=alias -l _nc-e2 { if ($len($1) < 3) { return $+ $1 $+ } | return $+ $left($1,1) $+ $+ $mid($1,2,$calc($len($1) - 2)) $+ $+ $right($1,1) $+ }
n198=alias -l _nc-e3 { if ($len($1) < 3) { return $+ $1 $+ } | return $+ $left($1,1) $+ $+ $mid($1,2,$calc($len($1) - 2)) $+ $+ $right($1,1) $+ }
n199=
n200=menu @NiCKs {
n201= dclick { if ($sline($active,1).ln > 4) { /msg %ncpro-chan $ncstyle($sline($active,1)) %ncpro-msg | window -c $active | halt } }
n202= CANCEL:window -c $active
n203=}
n204=
n205=alias nc.center { return $round( $calc( $calc( $window(-3).w /2) - $calc( $1 /2) ) ,0) $round( $calc( $calc( $window(-3).h /2) - $calc( $2 /2) ) ,0) $1 $2 }
n206=alias -l nc.draw {
n207= if ($isdir(system\ncbmps) != $true) { .mkdir system\ncbmps }
n208= window -hp +f @nc-pro 0 0 14 14 | set %NC.i -1 | :incnc | inc %NC.i 1
n209= if (%NC.i > 15) { goto colors }
n210= set %NC.f system\ncbmps\ $+ %NC.i $+ .bmp
n211= if ($isfile(%NC.f)) { .remove %NC.f }
n212= clear @nc-pro | drawfill @nc-pro %NC.i %NC.i 0 0 | drawsave @nc-pro %NC.f | goto incnc
n213= :colors
n214= if ($isfile(system\ncbmps\16.bmp)) { .remove system\ncbmps\16.bmp }
n215= window -hp +f @nc-pro 0 0 14 14 | clear @nc-pro | drawfill -r @nc-pro $rgb(face) $rgb(face) 0 0 | drawsave @nc-pro system\ncbmps\16.bmp
n216= window -c @nc-pro
n217= did -gv nc.pro 41 system\ncbmps\ $+ $iif(%ncpro-c-41 isnum 0-15,%ncpro-c-41,16) $+ .bmp
n218= did -gv nc.pro 81 system\ncbmps\ $+ $iif(%ncpro-c-81 isnum 0-15,%ncpro-c-81,16) $+ .bmp
n219= did -gv nc.pro 42 system\ncbmps\ $+ $iif(%ncpro-c-42 isnum 0-15,%ncpro-c-42,16) $+ .bmp
n220= did -gv nc.pro 82 system\ncbmps\ $+ $iif(%ncpro-c-82 isnum 0-15,%ncpro-c-82,16) $+ .bmp
n221= did -gv nc.pro 43 system\ncbmps\ $+ $iif(%ncpro-c-43 isnum 0-15,%ncpro-c-43,16) $+ .bmp
n222= did -gv nc.pro 44 system\ncbmps\ $+ $iif(%ncpro-c-44 isnum 0-15,%ncpro-c-44,16) $+ .bmp
n223=
n224=}
n225=alias -l nc.cor { if ($dialog(nc.colors)) { dialog -k nc.colors } | set %nc.pars $1 | set %nc.dlg $2 | set %nc.did $3 | .timer -m 1 1 dialog -m nc.colors nc.colors }
n226=alias -l nc.colors {
n227= if ($isfile(system\ncbmps\0.bmp) == $null) { nc.draw }
n228= set %NC.i -1 | :incnc | inc %NC.i 1
n229= if (%NC.i > 15) { unset NC.i | set %NC.f | return }
n230= set %NC.f system\ncbmps\ $+ %NC.i $+ .bmp
n231= did -gv nc.colors $calc(%NC.i + 1) %NC.f | goto incnc
n232=}