on @blacklist:join:#:{
  if (%cc181pio == on && %unome == 1) { /mode # -Q | /mode # -Q | /kick # $nick | /mode # -e $nick $1 | /mode # -e $mask($ial($$1,1),3) | /ban $address $1 2 | /ban $mask $$1 3 | /ban $address $1 2 | /mode # +b $nick $1- | kick # $nick 11B7lacklisted }
  if (%cc181pio == on && %unome == 2) { /mode # -Q | /mode # -Q | /kick # $nick | /mode # -e $nick $1 | /mode # -e $mask($ial($$1,1),3) | /ban $address $1 2 | /ban $mask $$1 3 | /ban $address $1 2 | /mode # +b $nick $1- | kick # $nick 3B15lacklisted }
}
Alias pozo { /dialog -m notice_dialog notice_dialog | if ( %cc181p == on ) { $tunder TDDialog $dialog(notice_dialog).hwnd > 2 } }
dialog -l notice_dialog {
  title "Notice on ... by L]e[G"
  size -1 -1 146 148
  option dbu
  box "Notice on invite", 1, 18 6 109 24
  check "", 2, 20 17 10 10, flat
  text "Attiva", 20, 30 17 25 10, flat
  edit "", 11, 60 17 50 10, autohs
  box "Notice on kick", 3, 18 32 108 21
  check "", 4, 20 40 10 10, flat
  text "Attiva", 40, 30 40 25 10, flat
  edit "", 10, 60 40 50 10, autohs
  button "Ok", 5, 57 131 32 12, ok
  box "Notice on DCC", 50, 18 61 109 24
  check "", 51, 48 69 10 10, flat
  text "Attiva", 510, 58 69 50 10, flat
  box "Notice Away", 100, 18 95 109 24
  check "", 101, 20 103 10 10, flat
  text "Attiva", 111, 30 103 40 10, flat
  edit "", 102, 60 103 50 10, autohs
}
on *:dialog:notice_dialog:edit:10:{ if (%unome == 1) { %ntc1 = $did(10) } | else %ntc3 = $did(10) }
on *:dialog:notice_dialog:edit:11:{ if (%unome == 1) { %ntc2 = $did(11) } | else %ntc4 = $did(11) }
on *:dialog:notice_dialog:edit:102:{ if (%unome == 1) { %tntc = $did(102) } | else %tntc1 = $did(102) }
on *:DIALOG:notice_dialog:sclick:2: { Set %cc45 $did(2) }
on *:DIALOG:notice_dialog:sclick:4: { Set %cc46 $did(4) }
on *:DIALOG:notice_dialog:sclick:51: { Set %cc345 $did(51) }
on *:DIALOG:notice_dialog:sclick:101: { Set %cc347 $did(101) }
on *:dialog:notice_dialog:init:*: {
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname $dialog($dname).hwnd
  if (%unome == 1) {
    dll $mdx SetDialog $dname bgcolor $rgb(0,72,170)
    dll $mdx SetColor $dname 1,3,50,100 background $rgb(255,134,0)
    dll $mdx SetColor $dname 2,20,4,40,51,510,101,111 background $rgb(0,72,170)
    dll $mdx SetColor $dname 2,20,4,40,51,510,101,111 textbg $rgb(0,72,170)
    dll $mdx SetColor $dname 11,10,102 background $rgb(0,0,0)
    dll $mdx SetColor $dname 11,10,102 textbg $rgb(0,0,0)
    dll $mdx SetColor 20,11,4,40,10,51,510,101,111,102 text $rgb(255,255,255)
    dll $mdx SetColor $dname 5 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll $mdx SetDialog $dname bgcolor $rgb(0,0,95)
    dll $mdx SetColor $dname 1,3,50,100 background $rgb(196,196,196)
    dll $mdx SetColor $dname 2,20,4,40,51,510,101,111 background $rgb(0,0,95)
    dll $mdx SetColor $dname 2,20,4,40,51,510,101,111 textbg $rgb(0,0,95)
    dll $mdx SetColor $dname 11,10,102 background $rgb(0,0,0)
    dll $mdx SetColor $dname 11,10,102 textbg $rgb(0,0,0)
    dll $mdx SetColor 20,11,4,40,10,51,510,101,111,102 text $rgb(255,255,255)
    dll $mdx SetColor $dname 5 background $rgb(0,0,95)
  }
  if %cc45 = ON { did -c notice_dialog 2 }
  if %cc46 = ON { did -c notice_dialog 4 }
  if %cc345 = ON { did -c notice_dialog 51 }
  if %cc347 = ON { did -c notice_dialog 101 }
  if (%unome == 1) { 
    did -a $dname 10 %ntc1 
    did -a $dname 11 %ntc2
    did -a $dname 102 %tntc
  } 
  else { 
    did -a $dname 10 %ntc3 
    did -a $dname 11 %ntc4
    did -a $dname 102 %tntc1
  }
}
on *:dialog:notice_dialog:sclick:5: {
  if ($did(notice_dialog,2).state = 1) { %cc45 = on } | else { %cc45 = off }
  if ($did(notice_dialog,4).state = 1) { %cc46 = on } | else { %cc46 = off }
  if ($did(notice_dialog,51).state = 1) { %cc345 = on } | else { %cc345 = off }
  if ($did(notice_dialog,101).state = 1) { %cc347 = on } | else { %cc347 = off }
}
on !1:INVITE:#: {
  if ( %cc45 == on ) && (%unome == 1) {
    /notice $nick %ntc2
  }
  if ( %cc45 == on ) && (%unome == 2) {
    /notice $nick %ntc4
  }
}
on ^1:INVITE:?: {
  if ( %cc45 == on ) && (%unome == 1) {
    /notice $nick %ntc2 
  }
  if ( %cc45 == on ) && (%unome == 2) {
    /notice $nick %ntc4 
  }
}
on ^1:KICK:#:{
  if ($knick == $me && %cc46 == on && %unome == 1 ) { /notice $nick %ntc1 | haltdef }
  if ($knick == $me && %cc46 == on && %unome == 2 ) { /notice $nick %ntc3 | haltdef }

}
on 1:FILESENT:*.*:{ if (%cc345 == on ) && (%unome == 1) { notice $nick 11T7i 11H7o 11M7anDaTo 11I7l 11F7iLe8 $nopath($filename) 11:7) | haltdef }
  if (%cc345 == on ) && (%unome == 2) { notice $nick 3T15i 3H15o 3M15anDaTo 3I15l 3F15iLe8 $nopath($filename) 3f15AcCi 3q15UaLcoSa | haltdef }
}
on 1:FILERCVD:*.*:{ if (%cc345 == on ) && (%unome == 1) { notice $nick 11H7o 11R7iCeVutO 11I7l 11T7uO 11F7iLe8 $nopath($filename) 11:7) | haltdef }
  if (%cc345 == on ) && (%unome == 2) { notice $nick 3H15o 3R15iCeVutO 3I15l 3F15iLe8 $nopath($filename) 3A15DeSSo 3C15i 3G15uArDo 3c15On 3C15AlMa | haltdef }
}
on 1:GETFAIL:*.*: { if (%cc345 == on ) && (%unome == 1) { notice $nick 11N7oN 11H7o 11R7iCeVuTo 11I7l 11F7iLe88 $nopath($filename) 11:7( | haltdef }
  if (%cc345 == on ) && (%unome == 2) { notice $nick 3N15oN 3H15o 3R15iCeVuTo 3I15l 3F15iLe8 $nopath($filename) 3R15iSeNda 3s15E 3r15IesCi | haltdef }
}
on 1:SENDFAIL:*.*: { if (%cc345 == on ) && (%unome == 1) { notice $nick 11N7oN 11S7oNo 11R7iuScItO 11a I7nViArTi 11I7l 11F7ilE8 $nopath($filename) 11:7( | haltdef }
  if (%cc345 == on ) && (%unome == 2) { notice $nick 3N15oN 3S15oNo 3R15iuScItO 3a I15nViArTi 3I15l 3F15ilE8 $nopath($filename) 3n15On 3m15I 3F15reGa 3M15olTo  | haltdef }
}
on *:action:*:#:{
  if ($me isin $1-) && ($away == $true) && (%cc347 == on) && (%unome == 1) { notice $nick %tntc } 
  if ($me isin $1-) && ($away == $true) && (%cc347 == on) && (%unome == 2) { notice $nick %tntc1 } 
}
#seen off
on *:text:*:#: {
  if (!seen isin $1) && ($2 != $null) && (%unome == 1) { readseen -s $2 | .ignore -u5 $nick | .notice $nick tra8 5 secondi ti tolgo dall'ignore }
}
on *:input:*: {
  if ($1 === !seen) && ($2 != $null) && (%unome == 1) { readseen -s $2 }
}
;main text event...
;(includes flood protection)
alias readseen {
  if ( $1 == -s ) {
    if ( $2 == $me ) { .timer 1 1 msg # %seenlogo Sono io $2 $+ ! }
    elseif ( $2 ison $active ) { .timer 1 1 msg # %seenlogo $2 è su $active $+ ! }
    else {
      if ( !$readini($polon,seen,$2) ) { .timer 1 1 msg # %seenlogo Mai visto sto $2 $+ ... }
      else { .timer 1 1 msg # %seenlogo $2 l'ho visto l'ultima volta $iif($gettok($readini($polon,seen,$2),1,32) == join , joinando $gettok($readini($polon,seen,$2),2,32) , $iif($gettok($readini($polon,seen,$2),1,32) == part , partendo $gettok($readini($polon,seen,$2),2,32) , $iif($gettok($readini($polon,seen,$2),1,32) == nick , cambiando nick in $gettok($readini($polon,seen,$2),2,32) , $iif($gettok($readini($polon,seen,$2),1,32) == kick , veniva kikkato dal canale $gettok($readini($polon,seen,$2),2,32) da $gettok($readini($polon,seen,$2),3,32) , $iif($gettok($readini($polon,seen,$2),1,32) == quit , quittava, col messaggio " $+ $gettok($readini($polon,seen,$2),4-$calc($numtok($readini($polon,seen,$2),32) - 1),32) $+ "))))) $duration($calc($ctime - $gettok($readini($polon,seen,$2),-1,32))) ai tempi... }
    }
  }
  else {
    if ( $3 == $me ) { msg %seenlogo $1 $+ $2 $+ : io sono $3 $+ ! }
    elseif ( $3 == $nick ) { msg %seenlogo $1 $+ $2 $+ : tu sei $3 $+ ! }
    elseif ( $3 ison $1 ) { msg %seenlogo $1 $+ $2 $+ : $3 e' in $chan $+ ! }
    else {
      if ( !$readini($polon,seen,$3) ) { msg %seenlogo $1 $+ $2 $+ : Mai visto sto $3 $+ ... }
      else { msg $1 .. $+ $2 $+ : $3 was last seen $iif($gettok($readini($polon,seen,$3),1,32) == join , joining $gettok($readini($polon,seen,$3),2,32) , $iif($gettok($readini($polon,seen,$3),1,32) == part , parting $gettok($readini($polon,seen,$3),2,32) , $iif($gettok($readini($polon,seen,$3),1,32) == nick , changing nicks to $gettok($readini($polon,seen,$3),2,32) , $iif($gettok($readini($polon,seen,$3),1,32) == kick , being kicked from $gettok($readini($polon,seen,$3),2,32) by $gettok($readini($polon,seen,$3),3,32) , $iif($gettok($readini($polon,seen,$3),1,32) == quit , quitting, with the msg " $+ $gettok($readini($polon,seen,$3),4-$calc($numtok($readini($polon,seen,$3),32) - 1),32) $+ "))))) $duration($calc($ctime - $gettok($readini($polon,seen,$3),-1,32))) ago... }
    }
  }
}
;seen events...
on *:join:#:{ writeini $shortfn($polon) seen $nick join $chan $ctime }
on *:part:#:{ writeini $shortfn($polon) seen $nick part $chan $ctime }
on *:nick:{ writeini $shortfn($polon) seen $nick nick $newnick $ctime }
on *:kick:#:{ writeini $shortfn($polon) seen $knick kick $chan $nick $1- $ctime }
on *:quit:{ writeini $shortfn($polon) seen $nick quit $1- $ctime }
#seen end
;seen popups...
menu channel {
  -
  Utility
  .!Seen Script
  ..$iif($group(#seen).status == on,Disabilita!,Abilita!):$iif($group(#seen).status == on,.disable #seen,.enable #seen) | echo -a 3* 7[3Seen7]3: $iif($group(#seen).status == on,Abilitato!,Diasabilitato!)
  ..-
  ..Pulisci file:clearseen
}
;clear seen file...
alias clearseen {
  .remini txt\seen.ini seen
  echo -a %info Senn File Ok
}
alias cmnd { /dialog -m cmnd cmnd | if ( %cc181p == on ) { $tunder TDDialog $dialog(cmnd).hwnd > 2 } }
dialog cmnd {
  title "Comandi alla connessione"
  size -1 -1 280 153
  option pixels
  tab "Net 1", 1, 5 4 268 110
  tab "Net 2", 5
  tab "Net 3", 6
  tab "Net 4", 7
  tab "Net 5", 8
  check "", 2, 16 118 21 17
  text "Attiva", 3, 40 117 43 17
  button "Ok", 4, 182 115 65 25, ok
  edit "", 9, 89 43 156 20, tab 1 autohs center %cmnn1
  edit "", 10, 91 75 153 20, tab 1 autohs center %netc1
  text "Comando:", 11, 22 45 62 17, tab 1
  text "Network:", 12, 23 74 60 17, tab 1
  edit "", 13, 91 42 156 20, tab 5 autohs center %cmnn2
  text "Comando:", 14, 24 44 62 17, tab 5
  text "Network:", 15, 25 73 60 17, tab 5
  edit "", 16, 93 74 153 20, tab 5 autohs center %netc2
  edit "", 17, 96 44 156 20, tab 6 autohs center %cmnn3
  text "Comando:", 18, 29 46 62 17, tab 6
  text "Network:", 19, 30 75 60 17, tab 6
  edit "", 20, 98 76 153 20, tab 6 autohs center %netc3
  text "Comando:", 21, 30 43 62 17, tab 7
  edit "", 22, 97 41 156 20, tab 7 autohs center %cmnn4
  text "Network:", 23, 31 72 60 17, tab 7
  edit "", 24, 99 74 153 20, tab 7 autohs center %netc4
  edit "", 25, 94 40 156 20, tab 8 autohs center %cmnn5
  edit "", 26, 96 73 153 20, tab 8 autohs center %netc5
  text "Network:", 27, 28 71 60 17, tab 8
  text "Comando:", 28, 27 42 62 17, tab 8
}
on *:dialog:cmnd:init:*:{
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3,11,12,14,15,18,19,23,21,27,28 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor 3,11,12,14,15,18,19,23,21,27,28,9,10,13,16,17,20,22,24,25,26 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 4,2,3,11,12,14,15,18,19,23,21,27,28 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 9,10,13,16,17,20,22,24,25,26 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 9,10,13,16,17,20,22,24,25,26 textbg $rgb(0,0,0)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3,11,12,14,15,18,19,23,21,27,28 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 3,11,12,14,15,18,19,23,21,27,28,9,10,13,16,17,20,22,24,25,26 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 4,2,3,11,12,14,15,18,19,23,21,27,28 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 9,10,13,16,17,20,22,24,25,26 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 9,10,13,16,17,20,22,24,25,26 textbg $rgb(0,0,0)
  }
  did -a $dname 9 %cmnn1
  did -a $dname 10 %netc1
  did -a $dname 16 %netc2
  did -a $dname 13 %cmnn2
  did -a $dname 17 %cmnn3
  did -a $dname 20 %netc3
  did -a $dname 22 %cmnn4
  did -a $dname 24 %netc4
  did -a $dname 25 %cmnn5
  did -a $dname 26 %netc5
  if (%attcomcon == on) did -c $dname 2
}
on *:dialog:cmnd:sclick:2:{ if (%attcomcon != on) { set %attcomcon on } | else unset %attcomcon }
on *:connect:{
  if ( %cmnn1 != $null && %attcomcon == on && $network == %netc1 ) { timerdut 1 1 %cmnn1 }
  if ( %cmnn2 != $null && %attcomcon == on && $network == %netc2 ) { timerdut 1 1 %cmnn2 }
  if ( %cmnn3 != $null && %attcomcon == on && $network == %netc3 ) { timerdut 1 1 %cmnn3 }
  if ( %cmnn4 != $null && %attcomcon == on && $network == %netc4 ) { timerdut 1 1 %cmnn4 }
  if ( %cmnn5 != $null && %attcomcon == on && $network == %netc5 ) { timerdut 1 1 %cmnn5 }
}
alias int { dialog -m $str($+(int_dialog,$chr(32)),2) | if ( %cc181p == on ) { $tunder TDDialog $dialog(int_dialog).hwnd > 2 } }
dialog int_dialog {
  title "Traduttore Arcan]G[elo"
  size -1 -1 107 55
  option dbu
  tab "Interprete" , 2 , 0 0 110 60
  tab "Traduttore" , 7
  check "", 1, 2 17 10 10, tab 2
  text "Attiva Traduttore", 11, 13 17 60 10, tab 2
  combo 3, 1 27 60 32, sort size drop, tab 2
  button "About", 4, 65 28 40 21, tab 2
  text "Copyleft @2005-2010", 5, 2 43 59 8, tab 2
  edit "Inserisci testo da tradurre...", 8, 0 16 107 27, multi autovs, tab 7
  button "Traduci", 9, 57 44 37 10, tab 7
  button "/Clear", 10, 13 44 37 10, tab 7
}
on *:dialog:about:init:*: {
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,4,5,6,7,8,9,10,11 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor 1,2,3,4,5,6,7,8,9,10 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 1,2,3,4,5,6,7,8,9,10,11 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 1,2,3,4,5,6,7,8,9,10,11 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 1,2,3,4,5,6,7,8,9,10 text $rgb(255,255,255)
    /dll dlls\mdx\mdx.dll SetColor $dname 1,2,3,4,5,6,7,8,9,10,11 background $rgb(0,0,95)
  }
}
on *:dialog:int_dialog:sclick:10: { did -r int_dialog 8 }
on *:dialog:int_dialog:sclick:9: {
  if (lingua !isin $did(int_dialog,3).text) && ($did(int_dialog,1).state == 1) { set %t.text $replace($did(int_dialog,8).text,si,sì,puo,può) | set %tr.setup on | get_traduttore | halt }
  else {
    if ($dialog(t_tr)) { dialog -x $str($+(t_tr,$chr(32)),2) }
dialog -m $str($+(t_tr,$chr(32)),2) | did -a t_tr 1 [Found_Error] - Non è stata selezionata alcuna lingua per la traduzione. Attivarne una e riprovare l'operazione | if ( %cc181p == on ) { $tunder TDDialog $dialog(t_tr).hwnd > 10 } } }
on *:dialog:int_dialog:close:*: { if (%on.t) { echo -a $timestamp 3* 7[3Interprete7]3: Hai chiuso il dialog ma lo script è ancora in funzione. | set %sel_c $replace(%on.t,it_en,2,it_fr,3,en_it,4,en_fr,5,en_de,6,fr_de,7,de_en,8) } }
on *:dialog:int_dialog:sclick:3: {
if ($did(int_dialog,1).state != 0) { if (lingua !isin $did(int_dialog,3)) { set %on.t $replace($did(int_dialog,3).text,\,_,Italiano,it,Inglese,en,Tedesco,de,Francese,fr,Spagnolo,es) } } }
on *:dialog:int_dialog:sclick:1: {
  did $+(-,$iif($did(int_dialog,1).state == 0,b,e)) int_dialog 3
  if ($did(int_dialog,1).state == 0) { unset %on.t }
else { if (lingua !isin $did(int_dialog,3).seltext) { set %on.t $replace($did(int_dialog,3).text,\,_,Italiano,it,Inglese,en,Tedesco,de,Francese,fr) } } }
on *:dialog:int_dialog:sclick:6: { ame utilizza [Interprete Instantaneo v.1.0.2] @Sp - Scaricalo al seguente indirizzo -> www.irc-zone.org (Sezione Addon utility) }
on *:dialog:int_dialog:init:*: {   
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1,5,11,4,9,10 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1,5,11 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 8 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 8 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 1,5,11,8 text $rgb(255,255,255)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 1,5,11,4,9,10 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 1,5,11 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 8 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 8 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 1,5,11,8 text $rgb(255,255,255)
  }
  set %int_s did -i int_dialog 3
  %int_s 1 Seleziona lingua..
  %int_s 2 Italiano\Inglese
  %int_s 3 Italiano\Francese
  %int_s 4 Inglese\Italiano
  %int_s 5 Inglese\Francese
  %int_s 6 Inglese\Tedesco
  %int_s 7 Francese\Tedesco
  %int_s 8 Francese\Inglese
  %int_s 9 Francese\Italiano
  %int_s 10 Spagnolo\Inglese
  %int_s 11 Spagnolo\Francese
  if (%on.t) { did -c int_dialog 1 | did -e int_dialog 3 | did -c int_dialog 3 %sel_c }
  else { did -b int_dialog 3 | did -c int_dialog 3 1 Seleziona lingua.. }
}
on *:input:*: { if (%on.t) && ($left($1,1) != /) { set %t.text $replace($1-,si,sì,puo,può) | set %t.chan $chan | unset %tr.setup | get_traduttore | halt } }
alias get_traduttore { sockclose trd | unset %m_out | sockopen trd world.altavista.com 80 }
on *:sockopen:trd: {
  set %sock_w sockwrite -n $sockname
  set %sock_fd <td bgcolor=white class=s><div style=padding:10px;>
  %sock_w GET /tr?doit=done&tt=urltext&urltext= $+ $replace(%t.text,$chr(32),+) $+ &url=http%3A%2F%2F&lp= $+ %on.t HTTP/1.0
  %sock_w Host: $+ $sock(trd).ip
  %sock_w
}
on *:sockread:trd: {
  sockread %sock_get
  if (%sock_fd isin %sock_get) { set %m_out on }
  if (%m_out) {
    if (%tr.setup == on) {
      if ($dialog(t_tr)) { dialog -x $str($+(t_tr,$chr(32)),2) }
    dialog -m $str($+(t_tr,$chr(32)),2) | did -a t_tr 1 $remove($iif(%sock_fd isin %sock_get,$gettok(%sock_get,3,62),%sock_get),</div></td>,</div) | if ( %cc181p == on ) { $tunder TDDialog $dialog(t_tr).hwnd > 10 } }
  else { msg %t.chan $remove($iif(%sock_fd isin %sock_get,$gettok(%sock_get,3,62),%sock_get),</div></td>,</div) | .msg %t.chan $remove($iif(%sock_fd isin %sock_get,$gettok(%sock_get,3,62),%sock_get),</div></td>,</div) } }
if (</div></td> isin %sock_get) { unset %m_out } }
on *:dialog:int_dialog:sclick:4: { dialog -m $str($+(about,$chr(32)),2) | if ( %cc181p == on ) { $tunder TDDialog $dialog(about).hwnd > 10 } }
dialog about {
  title "About - @Sp"
  size -1 -1 107 91
  option dbu
  text "Interprete instantaneo 1.0.2", 1, 1 2 105 8
  text "Semplice ma nello stesso tempo risultato", 2, 0 17 105 8
  text "piuttosto utile in certe situazioni.", 3, 0 23 106 8
  text "Consiglio vivamente di leggere il readme", 4, 0 29 105 8
  text "Per qualsiasi Consiglio,Bug,Critica:", 5, 0 35 107 8
  text "* Sp@irc-zone.org || Sp31337@gmail.com", 6, 0 50 104 8
  text "* irc.ircsure.net $ #scripters", 7, 0 57 104 8
  text "* irc.azzurra.org $ #Sp", 8, 0 64 108 8
  text "Sp", 9, 86 79 16 9
  text " ############", 10, 16 10 86 8
  button "Continua", 11, 1 79 37 11, ok
}
on *:dialog:int_dialog:edit:8: { if ($+(Inserisci testo da tradurre...,*) iswm $did(int_dialog,8).text) { did -r int_dialog 8 } }
dialog t_tr {
  title "Result [Traduzione]"
  size -1 -1 156 83
  option dbu
  edit "", 1, -1 0 158 82, multi autovs
}
on *:dialog:paco:init:*: {
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname
  dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,0)
  dll dlls/mdx/mdx.dll SetColor 1 background $dname bgcolor $rgb(0,0,0)
  dll dlls/mdx/mdx.dll SetColor 1 textbg $dname bgcolor $rgb(0,0,0)
  dll dlls/mdx/mdx.dll SetColor 1 text $rgb(255,255,0)
  /dll dlls\mdx\mdx.dll SetColor $dname 2,3,4,5,6,7,8,9,10,11 background $rgb(0,0,0)
}
dialog -l logs {
  title "Logs di Join"
  size -1 -1 146 50
  option dbu
  box "Rileva join con altri nick", 1, 18 6 109 24
  check "", 2, 48 17 10 10, flat
  text "Attiva", 3, 58 17 50 10
  button "Ok", 5, 57 35 32 12, ok
}
Alias logsj { /dialog -m logs logs | if ( %cc181p == on ) { $tunder TDDialog $dialog(logs).hwnd > 2 } }
menu menubar {
  -
  Arcan]G[elo utility
  .» Logs On Join:/logsj
  -
}
on *:DIALOG:logs:sclick:2: { Set %logs $did(2) }
on *:dialog:logs:init:*: {
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor 3 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(255,134,0)
    dll dlls/mdx/mdx.dll SetColor $dname 5 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 3 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(196,196,196)
    dll dlls/mdx/mdx.dll SetColor $dname 5 background $rgb(0,0,95)
  }
  if %logs = ON { did -c logs 2 }
}
on *:dialog:logs:sclick:5: {
  if ($did(logs,2).state = 1) { %logs = on } | else { %logs = off }
}
dialog -l lopino {
  title "Trasparenze dialog"
  size -1 -1 146 50
  option dbu
  box "Setta trasparenze dialog", 1, 18 6 109 24
  check "", 2, 48 17 10 10, flat
  text "Attiva", 3, 58 17 15 6
  button "Ok", 5, 57 35 32 12, ok
}
Alias trasp { /dialog -m lopino lopino | if ( %cc181p == on ) { $tunder TDDialog $dialog(lopino).hwnd > 2 } }
menu menubar {
  -
  Arcan]G[elo utility
  .» Trasparenza dialog:trasp
  -
}
on *:DIALOG:lopino:sclick:2: { Set %cc181p $did(2) }
on *:dialog:lopino:init:*: {
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(255,134,0)
    dll dlls/mdx/mdx.dll SetColor $dname 2 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 3 background bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor 2,3 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 5 background $rgb(0,72,170)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 1 background $rgb(196,196,196)
    dll dlls/mdx/mdx.dll SetColor $dname 2 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 3 background bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,3 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor 2,3 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 5 background $rgb(0,0,95)
  }
  if %cc181p = ON { did -c lopino 2 }
}
on *:dialog:lopino:sclick:5: {
  if ($did(lopino,2).state = 1) { %cc181p = on } | else { %cc181p = off }
}
;[read write data/setting.ini]
alias _vr {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  return $readini data\setting.ini $$1 $$2
}
alias _vw {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  writeini data\setting.ini $$1 $$2 $$3-
}
alias _vrem {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  remini data\setting.ini $$1 $$2
}
alias -l sqo {
  if ($_vr(querycon,switch) == on) { return [x] }
  else { return }
}
alias -l sqf {
  if ($_vr(querycon,switch) == off) { return [x] }
  else { return }
}
alias secure.query {
  if ($version < 5.91) { echo -a 4This addon will not work properly with mIRC $version $+ , please upgrade to latest mIRC www.mirc.com | beep | halt }
  if ($dialog(querycon) == $null) { dialog -m querycon querycon | if ( %cc181p == on ) { $tunder TDDialog $dialog(querycon).hwnd > 2 } }
}
alias secure.query.nick {
  if ($version < 5.91) { echo -a 4This addon will not work properly with mIRC $version $+ , please upgrade to latest mIRC www.mirc.com | beep | halt }
  dialog -m $_vr(querycon,query.nick) querycon1 | if ( %cc181p == on ) { $tunder TDDialog $dialog(querycon1).hwnd > 2 }
  _vrem querycon lastmsg
}
dialog querycon1 {
  title "Secure Query"
  size -1 -1 160 81
  option dbu
  box "", 33, 7 14 146 42
  button "Accetta", 28, 9 62 25 10, default ok
  button "Ignora", 26, 36 62 25 10
  button "Rifiuta", 27, 63 62 25 10
  edit "", 1, 32 21 119 10, read autohs
  edit "", 30, 32 31 119 10, read autohs
  edit "", 29, 32 41 119 10, read autohs
  check "", 31, 10 6 7 7
  text "Attiva secure query", 310, 17 6 70 7
  button "Opzioni", 2, 92 63 21 8
  button "Aggiungi", 3, 114 63 37 8
  box "", 4, 7 57 146 18
  text "Nick", 5, 9 22 10 8
  text "Indirizzo", 6, 9 32 19 8
  text "Msg", 7, 9 42 21 8
}
dialog querycon {
  title "secure query v2.12"
  size -1 -1 167 119
  option dbu
  button "OK", 12, 70 104 25 10, default ok
  tab "Config", 2, 2 1 163 115
  edit "", 3, 4 43 159 10, tab 2 autohs
  text "Messaggio attesa", 13, 4 35 44 7, tab 2
  edit "", 4, 4 60 159 10, tab 2 autohs
  check "", 15, 11 83 10 10, tab 2
  text "Attiva", 150, 21 83 32 10, tab 2
  button "Scegli suono", 16, 45 83 37 10, tab 2
  box "Segnale audio su richiesta query", 17, 8 75 80 22, tab 2
  edit "", 208, 109 79 15 9, tab 2
  button "-", 206, 101 81 5 5, tab 2
  text "Secondi", 210, 135 80 20 7, tab 2
  box "Auto-chiudi dialog", 209, 95 71 63 30, tab 2
  button "+", 207, 126 81 5 5, tab 2
  text "Rifiuta messaggio", 14, 4 53 44 7, tab 2
  check "", 33, 11 20 10 10, tab 2
  check "", 49, 92 20 10 10, tab 2
  check "", 50, 99 89 10 10, tab 2
  text "Attiva secure query", 330, 21 20 66 10, tab 2
  text "Notifica gli utenti che hanno accesso", 490, 102 20 66 10, tab 2
  text "Attiva auto-chiudi", 500, 109 89 58 10, tab 2
  box "", 51, 7 15 154 18, tab 2
  tab "Log", 11
  list 34, 7 20 42 50, tab 11 sort size hsbar
  button "Rimuovi", 35, 7 73 29 8, tab 11
  button "Copia", 39, 131 72 29 8, tab 11
  check "", 43, 7 95 10 10, tab 11
  text "Logga richieste query", 430, 17 95 58 10, tab 11
  edit "", 52, 86 84 74 10, tab 11 autohs
  button "Aggiungi", 53, 48 85 37 8, tab 11
  edit "", 64, 54 21 106 50, tab 11 read multi vsbar
  button "Canc. tutti", 65, 7 83 29 8, tab 11
  tab "Protezione", 32
  radio "", 211, 15 42 9 9, tab 32
  radio "", 212, 15 56 9 9, tab 32
  text "Mask universale *!*@*", 2110, 24 42 62 12, tab 32
  text "Ignora host mask", 2120, 24 56 62 9, tab 32
  box "Query flood ignore type", 213, 11 34 70 34, tab 32
  edit "", 214, 87 54 10 10, tab 32
  check "", 219, 89 42 10 10, tab 32
  text "Attiva", 2190, 99 42 40 10, tab 32
  box "Protezione flood in query", 216, 85 34 70 34, tab 32
  edit "", 217, 125 54 15 10, tab 32
  text "Queries in", 215, 99 56 24 7, tab 32
  text "Secs", 218, 141 55 17 7, tab 32
  tab "Access", 40
  list 41, 11 42 146 50, tab 40 sort size hsbar
  button "Rimuovi", 42, 12 96 37 8, disable tab 40
  text "Accesso utente", 44, 12 34 29 8, tab 40
  edit "", 45, 26 19 106 10, tab 40 autohs
  button "Aggiungi", 46, 134 20 29 8, disable tab 40
  text "Indirizzo", 47, 6 20 19 8, tab 40
  tab "?", 54
  box "", 55, 30 23 106 70, tab 54
  text "Autore:", 56, 60 31 17 8, tab 54
  text "Versione", 58, 60 42 17 8, tab 54
  link "www.allnightchat.it", 59, 56 80 56 8, tab 54
  text "KnightFal", 60, 84 31 22 8, tab 54
  text "v2.12", 61, 84 42 14 8, tab 54
}
on *:dialog:querycon1:init:*:{
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
  if (%unome = 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 33,31,310,4,5,6,7 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 33,31,310,4,5,6,7 textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 33,1,30,29,31,310,4,5,6,7 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 28,26,27,2,3 background $rgb(0,72,170)
  }
  if (%unome = 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 33,31,310,4,5,6,7 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 33,31,310,4,5,6,7 textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 33,1,30,29,31,310,4,5,6,7 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 28,26,27,2,3 background $rgb(0,0,95)
  }
  if ( %cc181p == on ) { $tunder TDDialog $dialog(querycon1).hwnd > 2 }
}
on *:dialog:querycon:init:*:{
  dll dlls/mdx/mdx.dll SetMircVersion $version
  dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
  if (%unome == 1) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 17,209,213,216 background $rgb(255,134,0)
    dll dlls/mdx/mdx.dll SetColor $dname 2,13,15,150,210,14,33,49,50,330,490,500,51,11,43,430,49,32,211,212,2110,2120,219,2190,215,218,40,41,42,44,47,54,55,56,58,59,60,61 background $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 2,13,15,150,210,14,33,49,50,330,490,500,51,11,43,430,49,32,211,212,2110,2120,219,2190,215,218,40,41,42,44,47,54,55,56,58,59,60,61  textbg $rgb(0,72,170)
    dll dlls/mdx/mdx.dll SetColor $dname 3,4,208,52,64,214,217,45 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 3,4,208,52,64,214,217,45 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 2,3,13,4,15,150,208,210,14,33,49,50,330,490,500,51,11,43,430,49,52,64,32,211,212,2110,2120,214,219,2190,217,215,218,40,41,42,44,45,47,54,55,56,58,59,60,61 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 12,16,206,35,39,53,65,46 background $rgb(0,0,0)
  }
  if (%unome == 2) {
    dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 17,209,213,216 background $rgb(196,196,196)
    dll dlls/mdx/mdx.dll SetColor $dname 2,13,15,150,210,14,33,49,50,330,490,500,51,11,43,430,49,32,211,212,2110,2120,219,2190,215,218,40,41,42,44,47,54,55,56,58,59,60,61 background $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 2,13,15,150,210,14,33,49,50,330,490,500,51,11,43,430,49,32,211,212,2110,2120,219,2190,215,218,40,41,42,44,47,54,55,56,58,59,60,61  textbg $rgb(0,0,95)
    dll dlls/mdx/mdx.dll SetColor $dname 3,4,208,52,64,214,217,45 background $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor $dname 3,4,208,52,64,214,217,45 textbg $rgb(0,0,0)
    dll dlls/mdx/mdx.dll SetColor 2,3,13,4,15,150,208,210,14,33,49,50,330,490,500,51,11,43,430,49,52,64,32,211,212,2110,2120,214,219,2190,217,215,218,40,41,42,44,45,47,54,55,56,58,59,60,61 text $rgb(255,255,255)
    dll dlls/mdx/mdx.dll SetColor $dname 12,16,206,35,39,53,65,46 background $rgb(0,0,0)
  }
  if ( %cc181p == on ) { $tunder TDDialog $dialog(querycon).hwnd > 2 }
  if ($_vr(querycon,switch) == on) { did -c querycon 33 }
  elseif ($_vr(querycon,switch) == $null) { _vw querycon switch on | did -c querycon 33 }
  if ($_vr(querycon,ignore.host) == $null) { _vw querycon ignore.host on | _vw querycon ignore.uni off }
  if ($_vr(querycon,decline) == $null) { _vw querycon decline Sorry, I have declined your query, please try a more convient time. }
  if ($_vr(querycon,ignore.uni) == on) && ($_vr(querycon,ignore.host) == off) { did -c querycon 211 1 }
  else did -c querycon 212 1
  did -o querycon 3 1 $_vr(querycon,standby)
  did -o querycon 4 1 $_vr(querycon,decline)
  if ($_vr(querycon,soundswitch) == on) { did -c querycon 15 }
  if ($_vr(querycon,timer) == $null) { _vw querycon timer 240 }
  did -o querycon 208 1 $_vr(querycon,timer)
  if ($_vr(querycon,max.query) == $null) { _vw querycon max.query 5 | did -o querycon 214 1 $_vr(querycon,max.query) }
  else did -o querycon 214 1 $_vr(querycon,max.query)
  if ($_vr(querycon,max.query.sec) == $null) { _vw querycon max.query.sec 20 | did -o querycon 217 1 $_vr(querycon,max.query.sec) }
  else did -o querycon 217 1 $_vr(querycon,max.query.sec)
  if ($_vr(querycon,netflood) == on) did -c querycon 219
  else did -b querycon 211,217,212,214
  if ($_vr(querycon,log) == on) { did -c querycon 43 }
  elseif ($_vr(querycon,log) == $null) { _vw querycon log on | did -c querycon 43 }
  if ($_vr(querycon,notifyaccess) == on) { did -c querycon 49 }
  elseif ($_vr(querycon,notifyaccess) == $null) { _vw querycon notifyaccess on | did -c querycon 49 }
  if ($_vr(querycon,auto-close) == on) { did -c querycon 50 }
  did -b querycon 46,42
  nick.list
  s.levels
  did -z querycon 34
}
on *:dialog:*:init:*:{
  if ($dialog($dname) == $_vr(querycon,query.nick)) {
    dll dlls/mdx/mdx.dll SetMircVersion $version
    dll dlls/mdx/mdx.dll MarkDialog $dname $dialog($dname).hwnd
    if (%unome = 1) {
      dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,72,170)
      dll dlls/mdx/mdx.dll SetColor $dname 5,6,7,310,31,26,27,28,2,3 background $rgb(0,72,170)
      dll dlls/mdx/mdx.dll SetColor $dname 5,6,7,310,31 textbg $rgb(0,72,170)
      dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 background $rgb(0,0,0)
      dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 textbg $rgb(0,0,0)
      dll dlls/mdx/mdx.dll SetColor 5,6,7,310,1,30,29 text $rgb(255,255,255)
      dll dlls/mdx/mdx.dll SetColor $dname 33,4,26 background $rgb(255,134,0)
    }
    if (%unome = 2) {
      dll dlls/mdx/mdx.dll SetDialog $dname bgcolor $rgb(0,0,95)
      dll dlls/mdx/mdx.dll SetColor $dname 5,6,7,310,31,26,27,28,2,3 background $rgb(0,0,95)
      dll dlls/mdx/mdx.dll SetColor $dname 5,6,7,310,31 textbg $rgb(0,0,95)
      dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 background $rgb(0,0,0)
      dll dlls/mdx/mdx.dll SetColor $dname 1,30,29 textbg $rgb(0,0,0)
      dll dlls/mdx/mdx.dll SetColor 5,6,7,310,1,30,29 text $rgb(255,255,255)
      dll dlls/mdx/mdx.dll SetColor $dname 33,4 background $rgb(196,196,196)
    }
    if ( %cc181p == on ) { $tunder TDDialog $dialog($dname).hwnd > 2 }
    if ($_vr(querycon,auto-close) == on) { %qs.nick = $_vr(querycon,query.nick) | .timer 1 $sq_t close.qw }
  }
}
on *:dialog:querycon:edit:*:{
  if ($did == 3) {
    if ($did(querycon,3).text != $null) {
      _vw querycon standby $did(querycon,3).text
    }
  }
  if ($did == 4) {
    if ($did(querycon,4).text != $null) {
      _vw querycon decline $did(querycon,4).text
    }
  }
  if ($did == 45) {
    if ($did(querycon,45).text != $null) { did -e querycon 46 }
    elseif ($did(querycon,45).text == $null) { did -b querycon 46 }
  }
  if ($did == 208) {
    if ($did(querycon,208).text != $null) {
      _vw querycon timer $did(querycon,208).text
    }
  }
  if ($did == 214) {
    if ($did(querycon,214).text != $null) {
      _vw querycon max.query $did(querycon,214).text
    }
  }
  if ($did == 217) {
    if ($did(querycon,217).text != $null) {
      _vw querycon max.query.sec $did(querycon,217).text
    }
  }
}
on *:dialog:*:sclick:*:{
  if (Query request $dname == $dialog($dname).title) {
    if ($did == 2) { secure.query }
    if ($did == 3) {
      auser -a securequery $did(30,$did(30)) $did(1,$did(1)) | did -b $did(1,$did(1)) 3
      if ($_vr(querycon,notifyaccess) == on) { if (%unome = 1) { .msg $did(1,$did(1)) [msg automatico] OK nick name accettato hai libero accesso alla query privata. | titlestop | title } }
    }
    if ($did == 27) { .ignore -pu180 $did(30,$did(30)) | if (%unome = 1) { .msg $did(1,$did(1)) [msg messaggio] $_vr(querycon,decline) } | dialog -x $did(1,$did(1)) }
    if ($did == 28) {
      .ignore -r $did(30,$did(30)) | query $did(1,$did(1)) | .timer -m 1 1 echo $did(1,$did(1)) < $+ $did(1,$did(1)) $+ > $did(29,$did(29)) | _vrem querycon lastmsg
      .msg $did(1,$did(1)) [msg automatico] Query richiesta accettata!! | titlestop | title 
      dialog -x $did(1,$did(1))
    }
    if ($did == 26) { .ignore -p $did(30,$did(30)) | dialog -x $did(1,$did(1)) }
    if ($did == 31) {
      if ($_vr(querycon,switch) != on) { _vw querycon switch on }
      else { _vw querycon switch off }
    }
  }
  if ($dialog(querycon) == $dname) {
    if ($did == 15) {
      if ($_vr(querycon,soundswitch) != on) { _vw querycon soundswitch on | did -c querycon 15 }
      else { _vw querycon soundswitch off | did -u querycon 15 }
    }
    if ($did == 16) { setquerysound }
    if ($did == 206) { if (%timer > 0) { dec %timer 1 | did -o querycon 208 1 %timer | _vw querycon timer %timer } }
    if ($did == 207) { inc %timer 1 | did -o querycon 208 1 %timer | _vw querycon timer %timer }
    if ($did == 39) { clipboard < $+ $did(34,$did(34).sel) $+ > $sr($did(34,$did(34).sel),msg) }
    if ($did == 34) { did -r querycon 64 | did -a querycon 64 $chr(91) $+ $sr($did(34,$did(34).sel),date) $+ $chr(93) | did -a querycon 64 $crlf $sr($did(34,$did(34).sel),msg) | did -o querycon 52 1 $_vr(securequery,$did(34,$did(34).sel))) }
    if ($did == 33) {
      if ($_vr(querycon,switch) != on) { _vw querycon switch on }
      else { _vw querycon switch off }
    }
    if ($did == 35) { write -ds $+ $did(34,$did(34).sel) securequery\names.txt | _vrem securequery $did(34,$did(34).sel)) | .timer -m 1 1 nick.list }
    if ($did == 41) { did -e querycon 42,46 | did -o querycon 45 1 $did(41,$did(41).sel)) }
    if ($did == 42) { ruser $did(41,$did(41).sel) | s.levels }
    if ($did == 43) {
      if ($_vr(querycon,log) != on) { _vw querycon log on | did -c querycon 43 }
      else { _vw querycon log off }
    }
    if ($did == 50) {
      if ($_vr(querycon,auto-close) != on) { _vw querycon auto-close on | did -c querycon 50 }
      else { _vw querycon auto-close off }
    }
    if ($did == 53) {
      if ($did(querycon,52).text != $null) {
        .auser -a securequery $did(querycon,52).text | did -r querycon 52
      }
    }
    if ($did == 49) {
      if ($_vr(querycon,notifyaccess) != on) { _vw querycon notifyaccess on | did -c querycon 49 }
      else { _vw querycon notifyaccess off }
    }
    if ($did == 46) {
      if ($did(querycon,45).text != $null) {
        .auser -a securequery $did(querycon,45).text | did -r querycon 45 | s.levels
      }
    }
    if ($did == 65) { .remove securequery\names.txt | .remove securequery\logs.ini | did -r querycon 64,34,52 }
    if ($did == 211) {
      if ($_vr(querycon,ignore.uni) == off) { _vw querycon ignore.uni on | _vw querycon ignore.host off | did -c querycon 211 | did -u querycon 212 }
      else { _vw querycon ignore.uni off | _vw querycon ignore.host on | did -u querycon 211 | did -c querycon 212 }
    }
    if ($did == 212) {
      if ($_vr(querycon,ignore.host) == off) { _vw querycon ignore.host on | _vw querycon ignore.uni off | did -c querycon 212 | did -u querycon 211 }
      else { _vw querycon ignore.host off | _vw querycon ignore.uni on | did -u querycon 212 | did -c querycon 211 }
    }
    if ($did == 219) {
      if ($_vr(querycon,netflood) == off) { _vw querycon netflood on | did -c querycon 219 | did -e querycon 211,217,212,214 }
      else { _vw querycon netflood off | did -u querycon 219 | did -b querycon 211,217,212,214 }
    }
  }
}
alias -l sr {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c securequery\logs.ini }
  return $readini securequery\logs.ini $$1 $$2
}
alias -l sw {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c securequery\logs.ini }
  writeini securequery\logs.ini $$1 $$2 $$3-
}
alias -l srem {
  if ($exists(securequery\logs.ini) == $false) { mkdir securequery | write -c securequery\logs.ini }
  remini securequery\logs.ini $$1 $$2
}
on ^*:open:?: {
  w $nick
  if ($_vr(querycon,switch) == $null) { _vw querycon switch on }
  if ($finddir($mircdir\,securequery*,1) == $null) { mkdir securequery }
  if ($_vr(querycon,netflood) != on) {
    inc %upflood15 1
    if (%upflood15 > $_vr(querycon,max.query)) {
      if ($_vr(querycon,ignore.uni) == on) { .ignore -pu $+ $_vr(querycon,max.query.sec) *!*@* }
      else { .ignore -pu $+ $_vr(querycon,max.query.sec) $wildsite }
      echo -a 3* 7[3ALLERT7]3: $nick is Query Flooding. User ( $+ $wildsite $+ ) now ignored for $_vr(querycon,max.query.sec) secs.
    }
    .timer 1 60 unset %upflood15
  }
  if ($_vr(querycon,standby) == $null) { _vw querycon standby Aspetta ho un sistema di query che mi permette di decidere se accettare o meno,quando accetterò chatteremo,per ora il tuo messaggio è ignorato. }
  if ($level($address($nick,3)) == securequery) { goto end }
  if ($_vr(querycon,switch) == on) {
    if ($_vr(querycon,soundswitch) == on) { if ($_vr(querycon,sound) != $null) { splay $_vr(querycon,sound) } }
    echo -a  $+ $colour(notice) $+ Ti ha contattato $nick ( $+ $wildsite $+ )
    echo -a  $+ $colour(notice) $+ Sta aspettando...
    if ($_vr(querycon,log) == on) {
      if ($read(securequery\names.txt, s, $nick) == $nick) { write -ds $+ $nick securequery\names.txt }
      sw $nick date $asctime(h:nn:sstt m/d) | sw $nick msg $strip($1-,burc) | write securequery/names.txt $nick | _vw securequery $nick $wildsite | nick.list
    }
    .ignore -pu180 $wildsite
    .msg $nick [msg automatico] $_vr(querycon,standby)
    _vw querycon query.nick $nick
    if ($dialog($nick) == $null) { secure.query.nick }
    dialog -t $_vr(querycon,query.nick) Query request $nick
    did -o $nick 1 1 $_vr(querycon,query.nick)
    did -o $nick 30 1 $wildsite
    did -o $nick 29 1 $strip($1-,burc)
    if ($_vr(querycon,switch) == on) { did -c $nick 31 }
    haltdef
    :end
  }
}
alias -l secure.dir {
  mkdir " $+ $mircdirsecurequery $+ \ $+ "
  return securequery $+ \
}
alias -l sq_t {
  return $_vr(querycon,timer)
}
alias -l nick.list {
  if ($dialog(querycon) != $null) {
    did -r querycon 64,34,52
    var %fst = $lines(securequery\names.txt)
    var %f = 1
    while (%f <= %fst) { did -a querycon 34 $read(securequery\names.txt,%f) | inc %f 1 }
  }
}
alias -l s.levels {
  did -r querycon 41
  var %s.l = $ulist(*,securequery,0)
  if (%s.l == 0) { did -b querycon 42 | return }
  else did -e querycon 42
  var %s.w = 0
  :loop
  inc %s.w
  if (%s.w <= %s.l) { did -a querycon 41 $ulist(*,securequery,%s.w) | goto loop }
  else return
}
alias -l close.qw { if ($dialog(%qs.nick) != $null) dialog -x %qs.nick }
alias -l setquerysound {
  _vw querycon sound $$dir="Choose a wav:" $mircdir*.wav;*mp3;*.mid
}
alias thanx { dialog -m grazie grazie | if ( %cc181p == on ) { $tunder TDDialog $dialog(grazie).hwnd > 2 } }
dialog Grazie {
  option dbu
  title "Grazie a:"
  size -1 -1 232 150
  edit "", 138, 15 15 200 125, multi vsbar read return
}
alias antiBan {
  set %stardust $dialog(antiBan)
  if (%stardust) unset %stardust
  else dialog -m antiBan antiBan
  if ( %cc181p == on ) { $tunder TDDialog $dialog(antiban).hwnd > 10 }
}
dialog antiban {
  title "Anakin Antiban by eMarco"
  size -1 -1 263 320
  box "Anti Kick/Ban/Deop", 1, 11 52 240 224
  box "", 25, 11 -2 240 50
  button "OK", 6, 11 289 64 24, ok
  text "P r o t e z i o n i " 22, 70 15 239 54
  button "Chiudi", 8, 91 289 64 24, cancel
  box "Punizione", 9, 23 200 216 64
  radio "Kick", 10, 33 221 40 13
  radio "Deop", 11, 33 241 44 13
  check "Attiva per", 7, 33 73 68 13
  radio "Kick/Ban", 12, 97 221 64 13
  radio "Ban/Kick", 13, 97 241 60 13
  edit "", 14, 168 240 42 20, multi return center
  text "sec", 15, 217 241 19 13
  box "Avviso", 16, 25 104 216 48
  check "Unbanna Me", 17, 153 169 80 13
  text "Solo per ChanServ", 18, 33 169 100 13
  check "Avvisami sul canale del BAN", 19, 33 126 152 13
  check "Kick", 21, 105 73 40 18, push
  check "Ban", 23, 145 73 40 18, push
  check "Deop", 24, 185 73 48 18, push
}
####
