;IRcap8 0ae4f872fde2899916b9a552f43500b1
alias -l S return $hget(setup,$1)
alias -l MG return $replace($readini(lng\ $+ %idioma $+ \setup.ini,setup,$1),&1,$2,&2,$3,&3,$4,&4,$5)

alias setred3 {
  if $1 == 2 {
    cuag @setup 190 152 200 84 gui $s(250)
    %setup.ls1 = 326 136 164 9 1 0 return @hash1
    cuagr @setup 168 116 364 184 $s(251)
    %setup.op = 202 172 ideninck $s(252) |202 200 #autoghost $s(253)
    %setup.bt = 382 268 50 setup.net_nick $s(254) |448 268 50 setup.net_nickinfo $s(255) |354 268 12 setup.net_pass_nick_- -|326 268 12 setup.net_pass_nick_+ +
    setup.net lee
  }
  if $1 == 3 {
    cuag @setup 190 152 200 84 gui $s(250)
    %setup.ls1 = 326 136 164 9 1 0 return @hash1
    cuagr @setup 168 116 364 184 $s(256)
    %setup.op = 202 172 afund $s(257)
    %setup.bt = 382 268 50 setup.net_join $s(258) |448 268 50 setup.net_canalinfo $s(255) |354 268 12 setup.net_pass_canal_- -|326 268 12 setup.net_pass_canal_+ +
    setup.net lee
  }

  if $1 == 4 {
    cuag @setup 190 152 200 84 gui $s(250)
    %setup.ls1 = 326 136 164 9 1 0 return @hash1
    cuagr @setup 168 116 364 184 $s(259)
    %setup.op = 202 172 setup.tmp.aja/ajoinmete $s(260)
    %setup.tx = 220 210 28 setup.tmp.ajr $s(261)
    %setup.bt = 390 268 108 setup.net_autojoin $s(262) |354 268 12 setup.net_autoj_- -|326 268 12 setup.net_autoj_+ +
    setup.net lee
  }
  %setup.cb = 144 84 120 setup.tmp.red %setup.tredes $+  $+ $s(133)
  muestrasetup
}




alias SETUP.NET {
  goto $1
  :listared | var %a = 1 , %b | while $findfile(s\net\,*.net,%a) != $null { var %n = $nopath($ifmatch) | %b = %b $+ $left(%n,$calc($len(%n) - 4)) $+  | inc %a } | %setup.tredes = $sorttok(%b,22) | %setup.cb = 144 84 120 setup.tmp.red %setup.tredes $+  $+ $s(133) | return
  :lee 
  var %p = $gettok(%setup.pñ1,3,32)
  if %p == 1 {
    var %f = s\net\ $+ %setup.tmp.red $+ .net
    %setup.tmp.botnombre = $readini %f net nombre
    %setup.tmp.botfic = $readini %f net menu
    %setup.tmp.botip = $readini %f net ip
    %setup.tmp.botpopup = $readini %f net popup
    var %i = $readini %f net var
    %setup.tmp.botn = $gettok(%i,1,32)
    %setup.tmp.botc = $gettok(%i,2,32)
    %setup.tmp.botm = $gettok(%i,3,32)
    %setup.tmp.botiden = $gettok(%i,6-99,32)
    muestrasetup
  }
  if %p == 2 { window -c @hash1 | window -hls @hash1 | var %i = 1 | :L1 | var %p = $readini %perfil nick. $+ %setup.tmp.red %i | if %p != $null { aline -l @hash1 $gettok(%p,1,32) | inc %i | goto L1 } }
  if %p == 3 { window -c @hash1 | window -hls @hash1 | var %i = 1 | :L2 | var %p = $readini %perfil canal. $+ %setup.tmp.red %i | if %p != $null { aline -l @hash1 $gettok(%p,1,32) | inc %i | goto L2 } }
  if %p == 4 { 
    var %a = $readini %perfil autojoin %setup.tmp.red | window -c @hash1 | window -hl @hash1 | var %i = 3 | :L3 | var %n = $gettok(%a,%i,44) | if %n != $null { aline @hash1 %n | inc %i 1 | goto L3 } 
    %setup.tmp.aja = $gettok(%a,1,44)
    %setup.tmp.ajr = $gettok(%a,2,44)
  }
  return
  : guarda
  var %f = s\net\ $+ %setup.tmp.red $+ .net
  wrini %f net nombre %setup.tmp.botnombre
  wrini %f net menu %setup.tmp.botfic
  wrini %f net ip %setup.tmp.botip
  wrini %f net popup %setup.tmp.botpopup
  var %i = %setup.tmp.botn %setup.tmp.botc %setup.tmp.botm - - %setup.tmp.botiden
  wrini %f net var %i
  bip
  goto Listared
  return
  :elinb | var %f = $dir=" $mg(red1) " [ s\net\*.inb ] | if (%f) { %setup.tmp.botfic = $nopath(%f) | refres } | return
  :nueva | var %a = $$?=" $mg(red2) " | unset %setup.tmp.bot* | %setup.tmp.red = %a | muestrasetup | return
  :borra | %a = $?!=" $mg(red3,%setup.tmp.red) " | if (%a) { remove s\net\ $+ %setup.tmp.red $+ .net | unset %setup.tmp.* | setnetw } | return
  :pass
  if $3 == + { if $2 == nick { var %n = $$?=" $mg(nick) " } | else { var %n = #$$?=" $mg(canal) " } | var %p = $$?=" $mg(pass) " | adpass $2 $+ . $+ %setup.tmp.red %n %p | .timer -m 1 100 muestrasetup | goto lee }
  if $3 == - { if ($sline(@hash1,1)) { %a = $?!=" $mg(red3,$ifmatch) " | if (%a) { delpass $2 $+ . $+ %setup.tmp.red $sline(@hash1,1) | .timer -m 1 100 muestrasetup | goto lee } } }
  return
  :nick | if ($sline(@hash1,1)) nick $ifmatch | return
  :nickinfo | if ($sline(@hash1,1)) mns info $ifmatch | return
  :join | if ($sline(@hash1,1)) join $ifmatch | return
  :canalinfo | if ($sline(@hash1,1)) mcs info $ifmatch | return
  :autoj
  if $2 == + { var %a = #$$?=" $mg(canalp) " | aline @hash1 %a | ajoinmete | muestrasetup }
  if $2 == - { if ($sline(@hash1,1).ln) { dline @hash1 $ifmatch | ajoinmete | muestrasetup } }
  return
  :autojoin | var %a = $readini %perfil autojoin $nnet | djoin $gettok(%a,2,44) $gettok(%a,3-,44)
}

alias ajoinMETE {
  if %setup.tmp.ajr == $null { %setup.tmp.ajr = 3 }
  if %setup.tmp.aja == $null { %setup.tmp.aja = off }
  var %a = %setup.tmp.aja $+ , $+ %setup.tmp.ajr
  var %i = 1
  :L1
  var %n = $line(@hash1,%i) | if %n != $null { %a = %a $+ , $+ %n | inc %i | goto L1 }
  if $line(@hash1,0) < 1 { remini %perfil autojoin %setup.tmp.red }
  else { wrini %perfil autojoin %setup.tmp.red %a }
}

;EOF-dt
