[aliases]
n0=[script]
n1=n0=;/////////////////////////////////////////////Awayer/////////////////////////////////////////////
n2=n1=dialog awaywarn {
n3=  n2=  title "AWAY"
n4=  n3=  option dbu
n5=  n4=  size 80 95 80 38
n6=  n5=  box "",9, 1 0 78 22
n7=  n6=  button "Вернуться",10, 1 24 78 12, cancel
n8=  n7=  button "Hide",12, 100 100 5 5, ok
n9=  n8=  text "В данный момент Вы находитесь в режиме AWAY",11, 3 5 74 16, center
n10=  n9=}
n11=  n10=
n12=  n11=on 1:dialog:awaywarn:sclick:10:{ goneback }
n13=  n12=
n14=  n13=alias awayer {
n15=    n14=  if $dialog(awayer) = $null { dialog -m awayer awayer }
n16=    n15=}
n17=    n16=dialog awayer {
n18=      n17=  title "Away система"
n19=      n18=  size -1 -1 253 142
n20=      n19=  option dbu
n21=      n20=  text "Причины отсутствия:", 2, 5 6 55 8
n22=      n21=  combo 3, 5 15 140 50, size
n23=      n22=  button "Добавить", 4, 5 65 69 10, flat
n24=      n23=  button "Удалить", 5, 76 65 69 10, flat
n25=      n24=  check "В режиме Away менять ник", 6, 153 14 80 10
n26=      n25=  box "Смена ника", 1, 148 6 100 69
n27=      n26=  text "или ставить приставку к нику", 8, 163 23 83 8
n28=      n27=  radio "Приставка к нику", 9, 163 33 69 10, group
n29=      n28=  radio "Менять ник", 10, 163 53 50 10
n30=      n29=  button "ОК", 11, 5 127 243 10, flat ok
n31=      n30=  text "YourNick", 12, 173 45 22 8
n32=      n31=  edit %awayprefix, 13, 196 43 50 10, autohs
n33=      n32=  edit %awaynick, 14, 173 63 73 10, autohs
n34=      n33=  box "Опции", 7, 5 76 140 49
n35=      n34=  check "Сообщать о режиме Away", 15, 10 83 78 10
n36=      n35=  check "Сообщать когда вернулся", 16, 10 112 80 10
n37=      n36=  radio "Один раз в момент включения", 17, 19 92 110 10, group
n38=      n37=  radio "Каждые", 18, 19 102 32 10
n39=      n38=  box "Авто Away", 19, 148 76 100 49
n40=      n39=  check "Включать режим Away", 20, 153 83 71 10
n41=      n40=  text "после", 21, 153 95 17 8
n42=      n41=  edit %awayautotime, 22, 170 93 14 10, center autohs limit 2
n43=      n42=  text "минут простоя", 23, 186 95 40 8
n44=      n43=  text "Причина", 24, 153 105 25 8
n45=      n44=  edit %awayautoreson, 25, 153 113 93 10, autohs
n46=      n45=  box "Away система", 26, 2 0 249 140
n47=      n46=  edit %awaymsgrepittime, 27, 51 102 14 10, center
n48=      n47=  text "минут", 28, 67 104 25 8
n49=      n48=}
n50=      n49=;=============================
n51=      n50=
n52=      n51=on 1:dialog:awayer:init:0:{
n53=        n52=  did -b awayer 4,5
n54=        n53=  readawayreasons
n55=        n54=  if (%awaynickchange == on) { did -c awayer 6 } 
n56=        n55=  if (%awaynickchange == off) { did -b awayer 9,10,12,13,14 }
n57=        n56=  if (%awaynickchangemode == pref) { did -c awayer 9 | did -b awayer 14 } 
n58=        n57=  if (%awaynickchangemode == nick) { did -c awayer 10 | did -b awayer 13 }
n59=        n58=  if (%awaygonemsg == on) { did -c awayer 15 } 
n60=        n59=  if (%awaygonemsg == off) { did -b awayer 17,18,27,28 }
n61=        n60=  if (%awaygonemsgmode == ones) { did -c awayer 17 | did -b awayer 27 } 
n62=        n61=  if (%awaygonemsgmode == mult) { did -c awayer 18 }
n63=        n62=  if (%awaybackmsg == on) { did -c awayer 16 } 
n64=        n63=  if (%awayautomod == on) { did -c awayer 20 } 
n65=        n64=  if (%awayautomod == off) { did -b awayer 22,24,25 }
n66=        n65=}
n67=        n66=;=============================
n68=        n67=
n69=        n68=on 1:dialog:awayer:sclick:*:{
n70=          n69=
n71=          n70=  if ($did == 11) {
n72=            n71=    set %awayprefix $did(13) 
n73=            n72=    set %awaynick $did(14) 
n74=            n73=    set %awaymsgrepittime $did(27) 
n75=            n74=    set %awayautotime $did(22) 
n76=            n75=    set %awayautoreson $did(25)
n77=          n76=  }
n78=          n77=
n79=          n78=  if ($did == 3) { did -e awayer 5 | did -b awayer 4 }
n80=          n79=
n81=          n80=  if ($did == 4) {
n82=            n81=    write $shortfn($mircdir) $+ txt\AwayReasons.txt $did(3) 
n83=            n82=    did -r awayer 3 
n84=            n83=    readawayreasons 
n85=            n84=    did -b awayer 4,5 
n86=          n85=  }
n87=          n86=
n88=          n87=  if ($did == 5) {
n89=            n88=    write -dw" $+ $did(3) $+ " $shortfn($mircdir) $+ txt\AwayReasons.txt | did -r awayer 3 | readawayreasons | did -b awayer 4,5
n90=          n89=  }
n91=          n90=
n92=          n91=  if ($did(6).state == 1) { 
n93=            n92=    set %awaynickchange on
n94=            n93=    if (%awaynickchangemode == pref) { did -e awayer 12,13,9,10 } 
n95=            n94=    if (%awaynickchangemode == nick) { did -e awayer 9,10,14 } 
n96=          n95=  }
n97=          n96=  else { 
n98=            n97=    set %awaynickchange off
n99=            n98=    did -b awayer 9,10,12,13,14
n100=          n99=  } 
n101=          n100=
n102=          n101=  if ($did == 9) {
n103=            n102=    set %awaynickchangemode pref
n104=            n103=    did -b awayer 14 | did -e awayer 13
n105=          n104=  }
n106=          n105=
n107=          n106=  if ($did == 10) {
n108=            n107=    set %awaynickchangemode nick
n109=            n108=    did -b awayer 13
n110=            n109=    did -e awayer 14
n111=          n110=  }
n112=          n111=  if ($did(15).state == 1) { 
n113=            n112=    set %awaygonemsg on
n114=            n113=    did -e awayer 17,18,28
n115=            n114=    if (%awaygonemsgmode == mult) { did -e awayer 27 } 
n116=          n115=  }
n117=          n116=  else { 
n118=            n117=    set %awaygonemsg off
n119=            n118=    did -b awayer 17,18,27,28 
n120=          n119=  }
n121=          n120=
n122=          n121=  if ($did == 17) { 
n123=            n122=    set %awaygonemsgmode ones
n124=            n123=    did -b awayer 27 
n125=          n124=  }
n126=          n125=  if ($did == 18) {
n127=            n126=    set %awaygonemsgmode mult
n128=            n127=    did -e awayer 27 
n129=          n128=  }
n130=          n129=
n131=          n130=  if ($did(16).state == 1) { set %awaybackmsg on } 
n132=          n131=  else { set %awaybackmsg off } 
n133=          n132=
n134=          n133=  if ($did(20).state == 1) { 
n135=            n134=    set %awayautomod on
n136=            n135=    did -e awayer 22,24,25
n137=            n136=    if ($server != $null) { .timerautoaway 0 5 autoawaycheck } 
n138=          n137=  }
n139=          n138=  else { set %awayautomod off | did -b awayer 22,24,25 | .timerautoaway* off }
n140=          n139=}
n141=          n140=;=============================
n142=          n141=
n143=          n142=on 1:dialog:awayer:edit:3:{
n144=            n143=  did -e awayer 4
n145=            n144=  did -b awayer 5
n146=            n145=}
n147=            n146=
n148=            n147=;*/Away система/*
n149=            n148=alias awayReasons { return $read -l $+ $1 $mircdirtxt\AwayReasons.txt }
n150=            n149=alias readawayreasons { 
n151=              n150=  var %awayresonind = $lines($mircdirtxt\AwayReasons.txt) + 1 
n152=              n151=  :next 
n153=              n152=  dec %awayresonind 1 
n154=              n153=  if (%awayresonind <= 0) { return } 
n155=              n154=  if ($read -l $+ %awayresonind $mircdirtxt\AwayReasons.txt == $null) { goto next } 
n156=              n155=  else { did -i awayer 3 1 $read -l $+ %awayresonind $mircdirtxt\AwayReasons.txt 
n157=              n156=  goto next } 
n158=              n157=}
n159=              n158=alias goneaway {
n160=                n159=  if ($away == $false) {
n161=                  n160=    if (%awaynickchange == on) { set %currentnick $me | if (%awaynickchangemode == pref) { nick $me $+ %awayprefix | set %nocurrentnick $me $+ %awayprefix } | if (%awaynickchangemode == nick) { nick %awaynick | set %nocurrentnick %awaynick } }
n162=                  n161=    if (%awaygonemsg == on) { 
n163=                    n162=      if (%itsautoaway == yes) { 
n164=                      n163=        unset %itsautoaway 
n165=                      n164=        if (%awaygonemsgmode == ones) { 
n166=                        n165=          if (%slap.sex != female) { /ame 12УшЁл 4ОтМазКа 13»»»10   $1- 13««« 2by 12N13e12O913n 12Script 4:::... } | else { /ame 12УшЛа 4ОтМазКа 13»»»10  $$! 13««« 2by 12N13e12O913n 12Script 4:::... }
n167=                        n166=          ;
n168=                      n167=        }
n169=                      n168=        if (%awaygonemsgmode == mult) { 
n170=                        n169=          if (%slap.sex != female) { /ame 12УшЁл 4ОтМазКа 13»»»10   $1- 13««« 2by 12N13e12O913n 12Script 4:::... } | else { /ame 12УшЛа 4ОтМазКа 13»»»10  $$! 13««« 2by 12N13e12O913n 12Script 4:::... }
n171=                        n170=          .timerawaymsg 0 $calc(%awaymsgrepittime * 60) awaymsgrep $1- | timerautoaway off
n172=                      n171=        }
n173=                    n172=      }
n174=                    n173=      else {
n175=                      n174=        if (%awaygonemsgmode == ones) {
n176=                        n175=          if (%slap.sex != female) { /ame 12УшЁл 4ОтМазКа 13»»»10   $+ $1- 13««« 2by 12N13e12O913n 12Script 4:::... } | else { /ame 12УшЛа 4ОтМазКа 13»»»10  $$! 13««« 2by 12N13e12O913n 12Script 4:::... }
n177=                      n176=        }
n178=                      n177=        if (%awaygonemsgmode == mult) {
n179=                        n178=          if (%slap.sex != female) { /ame 12УшЁл 4ОтМазКа 13»»»10   $+ $1- 13««« 2by 12N13e12O913n 12Script 4:::... } | else { /ame 12УшЛа 4ОтМазКа 13»»»10  $$! 13««« 2by 12N13e12O913n 12Script 4:::... }
n180=                        n179=          .timerawaymsg 0 $calc(%awaymsgrepittime * 60) awaymsgrep $1- 
n181=                      n180=        }
n182=                    n181=      }
n183=                  n182=    }
n184=                  n183=    set %since $ctime | .away $1- | dialog -mn awaywarn awaywarn
n185=                n184=  }
n186=                n185=  else { halt }
n187=                n186=}
n188=                n187=alias awaymsgrep {
n189=                  n188=  if (%slap.sex != female) { /ame 12УшЁл 4ОтМазКа 13»»»10   $1- 13««« 2by 12N13e12O913n 12Script 4:::... } | else { /ame 12УшЛа 4ОтМазКа 13»»»10  $$! 13««« 2by 12N13e12O913n 12Script 4:::... }
n190=                  n189=}
n191=                  n190=
n192=                  n191=alias goneback {
n193=                    n192=  .timerawaymsg off | .timerautoaway off
n194=                    n193=  if (%awaybackmsg == on) { 
n195=                      n194=    if (%slap.sex != female) { /ame 4ПрИшЁл 13»»»  3Меня Не было: $duration($calc($ctime - %since))  13»»»  2by 12N13e12O913n 12Script 4:::... } | else { 4ПрИшЛа 13»»»  3Меня Не было: $replace($duration($calc($ctime - %since),mins,мин,secs,сек,hrs,ч,wks,нед,days,д)13»»»  2by 12N13e12O913n 12Script 4:::... }
n196=                      n195=    unset %since
n197=                    n196=  }
n198=                    n197=  if (%awaynickchange == on) { nick %currentnick | unset %currentnick | unset %nocurrentnick } | unset %since | .away | if (%awayautomod == on) { .timerautoawayRE 1 $calc(%awayautotime * 60) .timerautoaway 0 5 autoawaycheck }
n199=                    n198=}
n200=                    n199=alias autoawaycheck { if ($away == $false) { if ($idle >= $calc(%awayautotime * 60)) { set %itsautoaway yes | goneaway %awayautoreson } } }
[script]
n0=;############## AWAYER ####################
n1=;########################################
n2=;########################################
n3=
n4=dialog awaywarn {
n5=  title "AWAY"
n6=  option dbu
n7=  size 80 95 80 38
n8=  box "",9, 1 0 78 22
n9=  button "Вернуться",10, 1 24 78 12, cancel
n10=  button "Hide",12, 100 100 5 5, ok
n11=  text "В данный момент Вы находитесь в режиме AWAY",11, 3 5 74 16, center
n12=}
n13=
n14=on 1:dialog:awaywarn:sclick:10:{ goneback }
n15=
n16=alias awayer {
n17=  if $dialog(awayer) = $null { dialog -m awayer awayer }
n18=}
n19=dialog awayer {
n20=  title "Away система"
n21=  size -1 -1 253 142
n22=  icon icons\away.ico  
n23=  option dbu
n24=  text "Причины отсутствия:", 2, 5 6 55 8
n25=  combo 3, 5 15 140 50, size
n26=  button "Добавить", 4, 5 65 69 10, flat
n27=  button "Удалить", 5, 76 65 69 10, flat
n28=  check "В режиме Away менять ник", 6, 153 14 80 10
n29=  box "Смена ника", 1, 148 6 100 69
n30=  text "или ставить приставку к нику", 8, 163 23 83 8
n31=  radio "Приставка к нику", 9, 163 33 69 10, group
n32=  radio "Менять ник", 10, 163 53 50 10
n33=  button "ОК", 11, 5 127 243 10, flat ok
n34=  text "YourNick", 12, 173 45 22 8
n35=  edit %awayprefix, 13, 196 43 50 10, autohs
n36=  edit %awaynick, 14, 173 63 73 10, autohs
n37=  box "Опции", 7, 5 76 140 49
n38=  check "Сообщать о режиме Away", 15, 10 83 78 10
n39=  check "Сообщать когда вернулся", 16, 10 112 80 10
n40=  radio "Один раз в момент включения", 17, 19 92 110 10, group
n41=  radio "Каждые", 18, 19 102 32 10
n42=  box "Авто Away", 19, 148 76 100 49
n43=  check "Включать режим Away", 20, 153 83 71 10
n44=  text "после", 21, 153 95 17 8
n45=  edit %awayautotime, 22, 170 93 14 10, center autohs limit 2
n46=  text "минут простоя", 23, 186 95 40 8
n47=  text "Причина", 24, 153 105 25 8
n48=  edit %awayautoreson, 25, 153 113 93 10, autohs
n49=  box "Away система", 26, 2 0 249 140
n50=  edit %awaymsgrepittime, 27, 51 102 14 10, center
n51=  text "минут", 28, 67 104 25 8
n52=}
n53=;=============================
n54=
n55=on 1:dialog:awayer:init:0:{
n56=  did -b awayer 4,5
n57=  readawayreasons
n58=  if (%awaynickchange == on) { did -c awayer 6 } 
n59=  if (%awaynickchange == off) { did -b awayer 9,10,12,13,14 }
n60=  if (%awaynickchangemode == pref) { did -c awayer 9 | did -b awayer 14 } 
n61=  if (%awaynickchangemode == nick) { did -c awayer 10 | did -b awayer 13 }
n62=  if (%awaygonemsg == on) { did -c awayer 15 } 
n63=  if (%awaygonemsg == off) { did -b awayer 17,18,27,28 }
n64=  if (%awaygonemsgmode == ones) { did -c awayer 17 | did -b awayer 27 } 
n65=  if (%awaygonemsgmode == mult) { did -c awayer 18 }
n66=  if (%awaybackmsg == on) { did -c awayer 16 } 
n67=  if (%awayautomod == on) { did -c awayer 20 } 
n68=  if (%awayautomod == off) { did -b awayer 22,24,25 }
n69=}
n70=;=============================
n71=
n72=on 1:dialog:awayer:sclick:*:{
n73=
n74=  if ($did == 11) {
n75=    set %awayprefix $did(13) 
n76=    set %awaynick $did(14) 
n77=    set %awaymsgrepittime $did(27) 
n78=    set %awayautotime $did(22) 
n79=    set %awayautoreson $did(25)
n80=  }
n81=
n82=  if ($did == 3) { did -e awayer 5 | did -b awayer 4 }
n83=
n84=  if ($did == 4) {
n85=    write $shortfn($mircdir) $+ txt\AwayReasons.txt $did(3) 
n86=    did -r awayer 3 
n87=    readawayreasons 
n88=    did -b awayer 4,5 
n89=  }
n90=
n91=  if ($did == 5) {
n92=    write -dw" $+ $did(3) $+ " $shortfn($mircdir) $+ txt\AwayReasons.txt | did -r awayer 3 | readawayreasons | did -b awayer 4,5
n93=  }
n94=
n95=  if ($did(6).state == 1) { 
n96=    set %awaynickchange on
n97=    if (%awaynickchangemode == pref) { did -e awayer 12,13,9,10 } 
n98=    if (%awaynickchangemode == nick) { did -e awayer 9,10,14 } 
n99=  }
n100=  else { 
n101=    set %awaynickchange off
n102=    did -b awayer 9,10,12,13,14
n103=  } 
n104=
n105=  if ($did == 9) {
n106=    set %awaynickchangemode pref
n107=    did -b awayer 14 | did -e awayer 13
n108=  }
n109=
n110=  if ($did == 10) {
n111=    set %awaynickchangemode nick
n112=    did -b awayer 13
n113=    did -e awayer 14
n114=  }
n115=  if ($did(15).state == 1) { 
n116=    set %awaygonemsg on
n117=    did -e awayer 17,18,28
n118=    if (%awaygonemsgmode == mult) { did -e awayer 27 } 
n119=  }
n120=  else { 
n121=    set %awaygonemsg off
n122=    did -b awayer 17,18,27,28 
n123=  }
n124=
n125=  if ($did == 17) { 
n126=    set %awaygonemsgmode ones
n127=    did -b awayer 27 
n128=  }
n129=  if ($did == 18) {
n130=    set %awaygonemsgmode mult
n131=    did -e awayer 27 
n132=  }
n133=
n134=  if ($did(16).state == 1) { set %awaybackmsg on } 
n135=  else { set %awaybackmsg off } 
n136=
n137=  if ($did(20).state == 1) { 
n138=    set %awayautomod on
n139=    did -e awayer 22,24,25
n140=    if ($server != $null) { .timerautoaway 0 5 autoawaycheck } 
n141=  }
n142=  else { set %awayautomod off | did -b awayer 22,24,25 | .timerautoaway* off }
n143=}
n144=;=============================
n145=
n146=on 1:dialog:awayer:edit:3:{
n147=  did -e awayer 4
n148=  did -b awayer 5
n149=}
n150=
n151=;*/Away система/*
n152=alias awayReasons { return $read -l $+ $1 $mircdirtxt\AwayReasons.txt }
n153=alias readawayreasons { 
n154=  var %awayresonind = $lines($mircdirtxt\AwayReasons.txt) + 1 
n155=  :next 
n156=  dec %awayresonind 1 
n157=  if (%awayresonind <= 0) { return } 
n158=  if ($read -l $+ %awayresonind $mircdirtxt\AwayReasons.txt == $null) { goto next } 
n159=  else { did -i awayer 3 1 $read -l $+ %awayresonind $mircdirtxt\AwayReasons.txt 
n160=  goto next } 
n161=}
n162=alias goneaway {
n163=  if ($away == $false) {
n164=    if (%sound.away == on) { /splay %wave.away }
n165=    if (%awaynickchange == on) { set %currentnick $me | if (%awaynickchangemode == pref) { nick $me $+ %awayprefix | set %nocurrentnick $me $+ %awayprefix } | if (%awaynickchangemode == nick) { nick %awaynick | set %nocurrentnick %awaynick } }
n166=    if (%awaygonemsg == on) { 
n167=      if (%itsautoaway == yes) { 
n168=        unset %itsautoaway 
n169=        if (%awaygonemsgmode == ones) { 
n170=          if (%slap.sex != female) { /ame 12..:: 8УшЁл, 15ОтМазКа 8» $1- 8« 12::.. } | else { /ame 12..:: 8УшЛа, 15ОтМазКа 8» $1- 8« 12::.. }
n171=          .set %away_pri4ina  $+ $1-
n172=        }
n173=        if (%awaygonemsgmode == mult) { 
n174=          if (%sound.away == on) { /splay %wave.away }
n175=          if (%slap.sex != female) { /ame 12..:: 8УшЁл, 15ОтМазКа 8» $1- 8« 12::.. } | else { /ame 12..:: 8УшЛа, 15ОтМазКа 8» $1- 8« 12::.. }
n176=          .set %away_pri4ina  $+ $1-
n177=          .timerawaymsg 0 $calc(%awaymsgrepittime * 60) awaymsgrep $1- | timerautoaway off
n178=        }
n179=      }
n180=      else {
n181=        if (%awaygonemsgmode == ones) {
n182=          if (%sound.away == on) { /splay %wave.away }
n183=          if (%slap.sex != female) { /ame 12..:: 8УшЁл, 15ОтМазКа 8» $1- 8« 12::.. } | else { /ame 12..:: 8УшЛа, 15ОтМазКа 8» $1- 8« 12::.. }
n184=          .set %away_pri4ina  $+ $1-
n185=        }
n186=        if (%awaygonemsgmode == mult) {
n187=          if (%sound.away == on) { /splay %wave.away }
n188=          if (%slap.sex != female) { /ame 12..:: 8УшЁл, 15ОтМазКа 8» $1- 8« 12::.. } | else { /ame 12..:: 8УшЛа, 15ОтМазКа 8» $1- 8« 12::.. }
n189=          .timerawaymsg 0 $calc(%awaymsgrepittime * 60) awaymsgrep $1- 
n190=          .set %away_pri4ina  $+ $1-
n191=        }
n192=      }
n193=    }
n194=    set %since $ctime | .away $1- | dialog -mn awaywarn awaywarn
n195=  }
n196=  else { halt }
n197=}
n198=alias awaymsgrep {
n199=  if (%sound.away == on) { /splay %wave.away }
n200=  if (%slap.sex != female) { /ame 12..:: 8УшЁл, 15ОтМазКа 8» $1- 8« 12::.. } | else { /ame 12..:: 8УшЛа, 15ОтМазКа 8» $1- 8« 12::.. }
n201=  .set %away_pri4ina  $+ $1-
n202=}
n203=
n204=alias goneback {
n205=  .timerawaymsg off | .timerautoaway off
n206=  if (%sound.back == on ) { /splay %wave.back }
n207=  if (%awaybackmsg == on) { 
n208=    if (%slap.sex != female) { /ame 12..:: 8ПрИшЁл 15»  15Меня Не Было: $duration($calc($ctime - %since))  8» 15Отсутствовал По Причине: %away_pri4ina 8« 12::.. } | else { /ame 12..:: 8ПрИшЛа 15»  15Меня Не Было: $duration($calc($ctime - %since))  8» 15Отсутствовала По Причине: %away_pri4ina 8« 12::.. }
n209=    unset %since
n210=  }
n211=  if (%awaynickchange == on) { nick %currentnick | unset %currentnick | unset %nocurrentnick } | unset %since | .away | if (%awayautomod == on) { .timerautoawayRE 1 $calc(%awayautotime * 60) .timerautoaway 0 5 autoawaycheck }
n212=}
n213=alias autoawaycheck { if ($away == $false) { if ($idle >= $calc(%awayautotime * 60)) { set %itsautoaway yes | goneaway %awayautoreson } } }
n214=
n215=
n216=;#####################################################
n217=;############## Система сервисов ###########################
n218=;####################################################
n219=
n220=alias service {
n221=  if $dialog(service) = $null { dialog -m service service }
n222=}
n223=dialog service {
n224=  title "Система сервисов IRC-сервера"
n225=  size -1 -1 132 153
n226=  option dbu
n227=  icon icons/services.ico, 0
n228=  radio "/msg chanserv, /msg nickserv, /msg memoserv", 1, 9 28 182 10, group
n229=  text "Выберите правильный вид сервисов для обращения к вашему IRC-серверу.", 2, 2 5 126 18
n230=  radio "/cs, /ns, /ms", 3, 9 40 182 10
n231=  radio "/chanserv, /nickserv, /memoserv", 4, 9 52 182 10
n232=  edit %chanserv, 8, 50 99 64 10
n233=  text "Если выбрали своё обращение к сервисам, то введите его ниже, если не выбирали, то поля не заполняйте!", 9, 9 76 114 21
n234=  text "ChanServ:", 10, 9 100 37 8
n235=  text "NickServ:", 11, 9 110 37 8
n236=  edit %nickserv, 12, 50 109 64 10
n237=  text "MemoServ:", 13, 9 120 37 8
n238=  edit %memoserv, 14, 50 119 64 10
n239=  button "ОК", 15, 16 137 37 12, ok
n240=  button "Выйти", 16, 76 137 37 12, cancel
n241=  radio "Свой вид", 5, 9 64 182 10
n242=}
n243=
n244=on *:dialog:service:init:*: {
n245=  if (%ownserv == 1) { did -c service 5 } 
n246=  if (%1serv == 1) { did -c service 1 }
n247=  if (%2serv == 1) { did -c service 3 }
n248=  if (%3serv == 1) { did -c service 4 }
n249=}
n250=
n251=on *:dialog:service:sclick:15: {
n252=  if $did(5).state = 1 { 
n253=    /set %ownserv 1
n254=    /set %1serv 0
n255=    /set %2serv 0
n256=    /set %3serv 0
n257=    /set %chanserv $did(8).text
n258=    /set %nickserv $did(12).text
n259=    /set %memoserv $did(14).text
n260=  }
n261=  if $did(1).state = 1 { 
n262=    /set %ownserv 0
n263=    /set %1serv 1
n264=    /set %2serv 0
n265=    /set %3serv 0
n266=    /set %chanserv /msg chanserv
n267=    /set %nickserv /msg nickserv
n268=    /set %memoserv /msg memoserv
n269=  }
n270=  if $did(3).state = 1 { 
n271=    /set %ownserv 0
n272=    /set %2serv 1
n273=    /set %1serv 0
n274=    /set %3serv 0
n275=    /set %chanserv /cs
n276=    /set %nickserv /ns
n277=    /set %memoserv /ms
n278=  }
n279=  if $did(4).state = 1 { 
n280=    /set %ownserv 0
n281=    /set %3serv 1
n282=    /set %2serv 0
n283=    /set %1serv 0
n284=    /set %chanserv /chanserv
n285=    /set %nickserv /nickserv
n286=    /set %memoserv /memoserv
n287=  }
n288=}
n289=
n290=;#####################################################
n291=;############## Быстрый AWAY ###########################
n292=;####################################################
n293=
n294=alias fast_away {
n295=  if $dialog(fast_away) = $null { dialog -m fast_away fast_away }
n296=}
n297=
n298=dialog fast_away {
n299=  title "Причина быстрого ухода в away?"
n300=  size -1 -1 121 38
n301=  option dbu
n302=  text "Причина быстрого ухода в away?", 1, 2 3 118 8
n303=  edit "", 2, 1 13 119 10
n304=  button "ОК", 3, 14 24 37 12, ok
n305=  button "Отмена", 4, 69 24 37 12, cancel
n306=}
n307=
n308=on *:dialog:fast_away:sclick:3: {
n309=  set %away_pri4ina $did(2)
n310=  if (%awaynickchange == on) { set %currentnick $me | if (%awaynickchangemode == pref) { nick $me $+ %awayprefix | set %nocurrentnick $me $+ %awayprefix } | if (%awaynickchangemode == nick) { nick %awaynick | set %nocurrentnick %awaynick } }
n311=  if (%slap.sex != female) { /ame 12..:: 8БыСтРеНьКо УшЁл, 15с ОтМазКоЙ 8» %away_pri4ina 8« 12::.. } | else { /ame 12..:: 8БыСтРеНьКо УшЛа, 15с ОтМазКоЙ 8» %away_pri4ina 8« 12::.. } | set %since $ctime | .away $1- | dialog -mn awaywarn awaywarn 
n312=}
n313=
n314=;#####################################################
n315=;############## Настройка звуков ###########################
n316=;####################################################
n317=
n318=alias waves {
n319=  if $dialog(waves) = $null { dialog -m waves waves }
n320=}
n321=
n322=dialog waves {
n323=  title "Настройка звуков"
n324=  size -1 -1 216 284
n325=  option dbu
n326=  icon icons/volume.ico, 0
n327=  text "В этом окне вы можете настроить свои звуки для проигрывания их в NeOn mIRC Script.", 1, 19 46 179 13, center
n328=  button "Выбрать", 3, 74 66 31 12
n329=  text "При запуске скрипта", 2, 4 68 68 9, center
n330=  button "О К", 4, 18 270 73 12, ok
n331=  text "При подключении", 5, 111 68 68 9, center
n332=  button "Выбрать", 6, 181 66 31 12
n333=  box "", 7, 106 61 108 205
n334=  box "", 8, 3 61 106 205
n335=  edit %wave.startup, 9, 4 77 100 10, disable
n336=  edit %wave.connect, 10, 111 77 100 10, disable
n337=  text "При ошибке соединения", 11, 4 90 68 9, center
n338=  button "Выбрать", 12, 74 88 31 12
n339=  edit %wave.fail, 13, 4 99 100 10, disable
n340=  text "При отключении", 14, 111 90 68 9, center
n341=  button "Выбрать", 15, 181 88 31 12
n342=  edit %wave.disconnect, 16, 111 99 100 10, disable
n343=  text "При ОПе на канале", 17, 4 112 68 9, center
n344=  button "Выбрать", 18, 74 110 31 12
n345=  edit %wave.op, 19, 4 121 100 10, disable
n346=  edit %wave.deop, 20, 111 121 100 10, disable
n347=  text "При деОПе на канале", 21, 111 112 68 9, center
n348=  button "Выбрать", 22, 181 110 31 12
n349=  text "При Войсе на канале", 23, 4 134 68 9, center
n350=  button "Выбрать", 24, 74 132 31 12
n351=  edit %wave.voice, 25, 4 143 100 10, disable
n352=  text "При деВойсе на канале", 26, 111 134 68 9, center
n353=  button "Выбрать", 27, 181 132 31 12
n354=  edit %wave.devoice, 28, 111 143 100 10, disable
n355=  text "При заходе на канал", 29, 4 156 68 9, center
n356=  edit %wave.join, 30, 4 165 100 10, disable
n357=  button "Выбрать", 31, 74 154 31 12
n358=  edit %wave.part, 32, 111 165 100 10, disable
n359=  text "При выходе с канала", 33, 111 156 68 9, center
n360=  button "Выбрать", 34, 181 154 31 12
n361=  text "При уведомлении", 35, 4 178 68 9, center
n362=  button "Выбрать", 36, 74 176 31 12
n363=  edit %wave.notify, 37, 4 187 100 10, disable
n364=  text "При AWAY", 38, 111 178 68 9, center
n365=  edit %wave.away, 39, 111 187 100 10, disable
n366=  button "Выбрать", 40, 181 176 31 12
n367=  text "При кике", 41, 4 200 68 9, center
n368=  button "Выбрать", 42, 74 198 31 12
n369=  edit %wave.kick, 43, 4 209 100 10, disable
n370=  text "При бане", 44, 111 200 68 9, center
n371=  button "Выбрать", 45, 181 198 31 12
n372=  edit %wave.ban, 46, 111 209 100 10, disable
n373=  edit %wave.back, 47, 4 231 100 10, disable
n374=  text "При возвращении с away", 48, 4 222 68 9, center
n375=  button "Выбрать", 49, 74 220 31 12
n376=  text "При нике в привате", 50, 111 222 68 9, center
n377=  button "Выбрать", 51, 181 220 31 12
n378=  edit %wave.cnick, 52, 111 231 100 10, disable
n379=  text "При нике на канале", 53, 111 244 68 9, center
n380=  button "Выбрать", 54, 181 242 31 12
n381=  edit %wave.pnick, 55, 111 253 100 10, disable
n382=  button "Отмена", 56, 125 270 73 12, cancel
n383=  icon 57, 0 0 214 42,  icons\waves.jpg, 0
n384=}
n385=
n386=
n387=
n388=on *:dialog:waves:sclick:3: {
n389=  var %wave.startup1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n390=  if $right(%wave.startup1,3) == wav {
n391=    /set %wave.startup %wave.startup1
n392=  } 
n393=}
n394=on *:dialog:waves:sclick:6: {
n395=  var %wave.connect1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n396=  if $right(%wave.connect1,3) == wav {
n397=    /set %wave.connect %wave.connect1
n398=  } 
n399=}
n400=on *:dialog:waves:sclick:12: {
n401=  var %wave.fail1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n402=  if $right(%wave.fail1,3) == wav {
n403=    /set %wave.fail %wave.fail1
n404=  } 
n405=}
n406=on *:dialog:waves:sclick:15: {
n407=  var %wave.disconnect1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n408=  if $right(%wave.disconnect1,3) == wav {
n409=    /set %wave.disconnect %wave.disconnect1
n410=  } 
n411=}
n412=on *:dialog:waves:sclick:18: {
n413=  var %wave.op1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n414=  if $right(%wave.op1,3) == wav {
n415=    /set %wave.op %wave.op1
n416=  } 
n417=}
n418=on *:dialog:waves:sclick:22: {
n419=  var %wave.deop1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n420=  if $right(%wave.deop1,3) == wav {
n421=    /set %wave.deop %wave.deop1
n422=  } 
n423=}
n424=on *:dialog:waves:sclick:24: {
n425=  var %wave.voice1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n426=  if $right(%wave.voice1,3) == wav {
n427=    /set %wave.voice %wave.voice1
n428=  } 
n429=}
n430=on *:dialog:waves:sclick:27: {
n431=  var %wave.devoice1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n432=  if $right(%wave.devoice1,3) == wav {
n433=    /set %wave.devoice %wave.devoice1
n434=  } 
n435=}
n436=on *:dialog:waves:sclick:31: {
n437=  var %wave.join1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n438=  if $right(%wave.join1,3) == wav {
n439=    /set %wave.join %wave.join1
n440=  } 
n441=}
n442=on *:dialog:waves:sclick:34: {
n443=  var %wave.part1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n444=  if $right(%wave.part1,3) == wav {
n445=    /set %wave.part %wave.part1
n446=  } 
n447=}
n448=on *:dialog:waves:sclick:36: {
n449=  var %wave.notify1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n450=  if $right(%wave.notify1,3) == wav {
n451=    /set %wave.notify %wave.notify1
n452=  } 
n453=}
n454=on *:dialog:waves:sclick:40: {
n455=  var %wave.away1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n456=  if $right(%wave.away1,3) == wav {
n457=    /set %wave.away %wave.away1
n458=  } 
n459=}
n460=on *:dialog:waves:sclick:42: {
n461=  var %wave.kick1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n462=  if $right(%wave.kick1,3) == wav {
n463=    /set %wave.kick %wave.kick1
n464=  } 
n465=}
n466=on *:dialog:waves:sclick:45: {
n467=  var %wave.ban1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n468=  if $right(%wave.ban1,3) == wav {
n469=    /set %wave.ban %wave.ban1
n470=  } 
n471=}
n472=on *:dialog:waves:sclick:49: {
n473=  var %wave.back1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n474=  if $right(%wave.back1,3) == wav {
n475=    /set %wave.back %wave.back1
n476=  } 
n477=}
n478=on *:dialog:waves:sclick:51: {
n479=  var %wave.cnick1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n480=  if $right(%wave.cnick1,3) == wav {
n481=    /set %wave.cnick %wave.cnick1
n482=  } 
n483=}
n484=on *:dialog:waves:sclick:54: {
n485=  var %wave.pnick1 $sfile($mircdiricons\sounds\*.wav,Выберите проигрываемый файл,Хорошо)
n486=  if $right(%wave.pnick1,3) == wav {
n487=    /set %wave.pnick %wave.pnick1
n488=  } 
n489=}
n490=
n491=
n492=
n493=;#####################################################
n494=;################## IRC-Статус ###########################
n495=;####################################################
n496=
n497=alias status {
n498=  if $dialog(status) = $null { dialog -m status status }
n499=}
n500=
n501=dialog status {
n502=  title "Мой статус"
n503=  size -1 -1 113 181
n504=  option dbu
n505=  icon icons/lamp.ico, 0
n506=  combo 1, 7 64 60 83, size
n507=  button "Добавить", 2, 70 80 37 12, flat
n508=  button "Удалить", 3, 70 93 37 12, flat
n509=  button "Установить", 4, 70 64 37 12, ok
n510=  box "Установить статус в IRC", 5, 1 55 111 97
n511=  text "Внимание! Твой статус будет отображаться только у пользователей NeOn mIRC Script", 6, 4 157 106 20
n512=  box "", 7, 1 151 111 28
n513=  text "Установив статус в IRC, другие люди, зайдя к тебе в приват или посмотрев его, будут его видеть. Например, как в ICQ.", 8, 3 33 111 20
n514=  icon 9, 0 0 112 29, icons/status.gif, 0
n515=}
n516=
n517=on 1:dialog:status:init:0:{
n518=  did -b status 2,3
n519=  readstatus
n520=}
n521=
n522=on 1:dialog:status:sclick:*: {
n523=  if ($did == 1) { did -e status 3 | did -b status 2 }
n524=
n525=  if ($did == 2) {
n526=    write $shortfn($mircdir) $+ txt\status.txt $did(1) 
n527=    did -r status 1 
n528=    readstatus 
n529=    did -b status 2,3 
n530=  }
n531=
n532=  if ($did == 3) {
n533=    write -dw" $+ $did(1) $+ " $shortfn($mircdir) $+ txt\status.txt | did -r status 1 | readstatus | did -b status 2,3
n534=  }
n535=
n536=  if ($did == 4) {
n537=    if ($did(1) == $chr(0)) {
n538=      /unset %status.text
n539=    } | else { /set %status.text $did(1) } 
n540=  }
n541=}
n542=
n543=on 1:dialog:status:edit:1:{
n544=  did -e status 2
n545=  did -b status 3
n546=}
n547=
n548=alias readstatus { 
n549=  var %statusind = $lines($mircdirtxt\status.txt) + 1 
n550=  :next 
n551=  dec %statusind 1 
n552=  if (%statusind <= 0) { return } 
n553=  if ($read -l $+ %statusind $mircdirtxt\status.txt == $null) { goto next } 
n554=  else { did -i status 1 1 $read -l $+ %statusind $mircdirtxt\status.txt 
n555=  goto next } 
n556=}
n557=
n558=alias state { return $read -l $+ $1 $mircdirtxt\status.txt }
n559=
n560=
n561=;######
n562=;########################################
n563=;######
