
dialog -l notice_dialog {
  title "AutoNotice    4 Angel Red Script"
  size -1 -1 146 148
  option dbu
  box "Notice on invite", 1, 18 6 109 24
  check "Attiva", 2, 20 17 25 10, flat
  edit "", 11, 60 17 50 10, autohs 
  box "Notice on kick", 3, 18 32 108 21
  check "Attiva", 4, 20 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 "Attiva", 51, 20 69 50 10, flat
  box "Notice Away", 100, 18 95 109 24
  check "Attiva", 101, 20 103 40 10, flat
  edit "", 102, 60 103 50 10, autohs
}

Alias pozo { /dialog -m notice_dialog notice_dialog }

on *:dialog:notice_dialog:edit:10:{ %ntc1 = $did(10) }
on *:dialog:notice_dialog:edit:11:{ %ntc2 = $did(11) }
on *:dialog:notice_dialog:edit:102:{ %tntc = $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:*: {
  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 } 
  did -a $dname 10 %ntc1
  did -a $dname 11 %ntc2
  did -a $dname 102 %tntc
}

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 ) {     
    /notice $nick %ntc2
  }
}
on ^1:INVITE:?:
if ( %cc45 == on ) {     
  /notice $nick %ntc2 )
}
on ^1:KICK:#:{
  if ($knick == $me && %cc46 == on ) { /notice $nick %ntc1 | haltdef }
}
on 1:FILESENT:*.*:{ if (%cc345 == on ) { notice $nick Ti sto inviando il fil13 $nopath($filename)  | haltdef }
}
on 1:FILERCVD:*.*:{ if (%cc345 == on ) { notice $nick Ho appena ricevuto il tuo file13  $nopath($filename)  | haltdef }
}
on 1:GETFAIL:*.*: { if (%cc345 == on ) { notice $nick Non ho ricevuto il tuo file13 $nopath($filename)  | haltdef }
}
on 1:SENDFAIL:*.*: { if (%cc345 == on )  { notice $nick Mi spiace, ma non riesco ad inviarti il file:(13 $nopath($filename)  | haltdef }
}
on *:TEXT:*:#:{
  if ($me isin $1-) && ($away == $true) && (%cc347 == on) { notice $nick %tntc }
}
on *:action:*:#:{
  if ($me isin $1-) && ($away == $true) && (%cc347 == on) { notice $nick %tntc }
}
