[script]
n0=;#########################
n1=; capture des triggers
n2=; au bout update
n3=;#########################
n4=
n5=; attention il est prevu pour fonctionner avec invision, sysreset et excursion , sinon changer les variables
n6=; le filtre.ini est indispensable sinon ajouter une fonction pour les salons couverts
n7=; limité a 5 salons mais on peut en rajouter
n8=
n9=Menu nicklist {
n10=  Info rapide: { /echo -a $infmask($ial($1)) }
n11=  -Liste Serveur mp3: { 
n12=    if $exists($mircdirdownload\ $+ ! $+ $1 $+ 's_mp3list.htm) { /write -c $mircdirDownload\list.txt ! $+ $1 $+ 's_mp3list.htm |  /dialog -m affiche.mp3 affiche.mp3 }
n13=    else { 
n14=      var %temp  = $read($mircdirxdccTemp/dccMp3.txt,w, $+ $1 $+ *)
n15=      if (%temp == $null) { aecho 4,8 Pas de trigger mp3 détecté pour $1 }
n16=      else { /msg %filtre.chan @ $+ $1 }
n17=    }
n18=  }
n19=}
n20=
n21=Menu channel,@filtre {
n22=  -Liste serveurs { /dialog -m dccserv dccserv }
n23=  -Chercher:/say @find $$?="Mots clés"
n24=}
n25=
n26=on 1:load:{
n27=  if (!$exists($mircdirxdccTemp)) {
n28=    /mkdir $mircdirxdccTemp
n29=  }
n30=}
n31=
n32=on 1:START: {
n33=  ./toolbar -az1 serveurs "liste des serveurs dcc" Invision\Themes\Gfx\Default\dccserv.ico  /dccserveurs
n34=  var %temp = $findfile($mircdirxdccTemp,*.txt,0,/remove -b $1-)
n35=}
n36=
n37=alias dccserveurs {
n38=  /dialog -m dccserv dccserv
n39=}
n40=
n41=on 1:nick: {
n42=  if ( $nick != $me ) {
n43=    %trigger.salon = $chan
n44=    var %tmp = $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ $nick $+ .txt
n45=    if $exists(%tmp) {
n46=      .rename %tmp $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ $newnick $+ .txt
n47=    }
n48=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt,w, $+ $nick $+ *)) {
n49=      var %temp = $puttok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt,w, $+ $nick $+ *), $+ $newnick $+ ,1,59 )
n50=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt %temp
n51=    }
n52=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt,w, $+ $nick $+ *)) {
n53=      var %temp = $puttok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt,w, $+ $nick $+ *), $+ $newnick $+ ,1,59 )
n54=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt %temp
n55=    }
n56=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt,w, $+ $nick $+ *)) {
n57=      var %temp = $puttok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt,w, $+ $nick $+ *), $+ $newnick $+ ,1,59 )
n58=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt %temp
n59=    }
n60=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt,w, $+ $nick $+ *)) {
n61=      var %temp = $puttok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt,w, $+ $nick $+ *), $+ $newnick $+ ,1,59 )
n62=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt %temp
n63=    }
n64=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt,w, $+ $nick $+ *)) {
n65=      var %temp = $puttok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt,w, $+ $nick $+ *), $+ $newnick $+ ,1,59 )
n66=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt
n67=    }
n68=  }
n69=}
n70=on 1:quit: {
n71=  if ( $nick != $me ) {
n72=    %trigger.salon = $chan
n73=    var %tmp = $mircdirxdccTemp/ $+ %trigger.salon $+ - $+  $+ $nick $+ .txt
n74=    if ( %tmp != $null ) {
n75=      .remove %tmp
n76=    }
n77=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt,w, $+ $nick $+ *)) {
n78=      /write -dl $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt
n79=    }
n80=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt,w, $+ $nick $+ *)) {
n81=      /write -dl $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt
n82=    }
n83=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt,w, $+ $nick $+ *)) {
n84=      /write -dl $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt
n85=    }
n86=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt,w, $+ $nick $+ *)) {
n87=      /write -dl $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt
n88=    }
n89=    if ($nick isin $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt,w, $+ $nick $+ *)) {
n90=      /write -dl $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt
n91=    }
n92=  }
n93=}
n94=
n95=on 1:text:*:%filtre.chan: {
n96=  %trigger.salon = $chan
n97=  if ($left($strip($1-),13) == [Serveur HTTP )  { 
n98=    %http.capt = $gettok($strip($1-),4-,32)
n99=    var %temp = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt,w, $+ $nick $+ * )
n100=    if (%temp = $null ) { /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt $nick $+ $chr(59) $+ %http.capt }
n101=    else { /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ http.txt $nick $+ $chr(59) $+ %http.capt }
n102=  }
n103=
n104=  if ($left($strip($1-),10) == FTP Online )  { 
n105=    %ftp.capt = $gettok($strip($1-),3,32)
n106=    %ftp.pseudo = $gettok($strip($1-),4,32)
n107=    var %temp = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt,w, $+ $nick $+ * )
n108=    if (%temp = $null ) { /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt $nick $+ $chr(59) $+ %ftp.capt $+ $chr(59) $+ %ftp.pseudo }
n109=    else { /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ ftp.txt $nick $+ $chr(59) $+ %ftp.capt $+ $chr(59) $+ %ftp.pseudo }
n110=  }
n111=
n112=  if ($left($strip($1-),17) == mp3 Server Online )  { 
n113=    if (Commands: !isin $strip($1-)) {
n114=      %mp3trig.capt = $gettok($strip($1-),5,32)
n115=      if ( /ctcp isin $1- ) { %mp3trig.capt = $gettok($strip($1-),7,32) }
n116=      var %temp  = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt,w, $+ $nick $+ * $+ * $+ mp3 $+ *)
n117=      if (%temp = $null ) { /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt $nick $+ $chr(59) $+ %mp3trig.capt $+ $chr(59) $+ mp3 }
n118=      else { /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt $nick $+ $chr(59) $+ %mp3trig.capt $+ $chr(59) $+ mp3 }
n119=    }
n120=    else {
n121=      %mp3.ctcp.trig = $gettok($replace($strip($1-),Commands:,$chr(59),Sends:,$chr(59)),2,59)
n122=      var %temp  = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt,w, $+ $nick $+ * $+ * $+ ctcp $+ *)
n123=      if (%temp = $null ) { /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt $nick $+ $chr(59) $+ %mp3.ctcp.trig $+ $chr(59) $+ ctcp }
n124=      else { /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dccMp3.txt $nick $+ $chr(59) $+ %mp3.ctcp.trig $+ $chr(59) $+ ctcp }
n125=    }
n126=  }
n127=  if ($left($strip($1-),11) == TDCC Server)  {
n128=    var %tdcc.nick = $nick  
n129=    var %temp = $replace($strip($1-,burc),«,$chr(59),»,$chr(59))
n130=    %tdcc.trig = $gettok(%temp,4,59)
n131=    %tdcc.desc = $gettok(%temp,2,59)
n132=    %tdcc.size = $remove($gettok(%temp,6,59),$chr(32))
n133=    var %temp  = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt,w, $+ %tdcc.nick $+ * )
n134=    if (%temp = $null ) { /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt %tdcc.nick $+ $chr(59) $+ %tdcc.trig $+ $chr(59) $+ %tdcc.desc $+ $chr(59) $+ %tdcc.size }
n135=    else { 
n136=      if (%tdcc.trig isin %temp ) {
n137=        /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt %tdcc.nick $+ $chr(59) $+ %tdcc.trig $+ $chr(59) $+ %tdcc.desc $+ $chr(59) $+ %tdcc.size  
n138=      }
n139=      else {
n140=        var %temp = $gettok(%temp,2,59)
n141=        /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ tdcc.txt %tdcc.nick $+ $chr(59) $+ %temp $+ • $+ %tdcc.trig $+ $chr(59) $+ %tdcc.desc $+ $chr(59) $+ %tdcc.size 
n142=      }
n143=    }
n144=  }
n145=  var %temp = $remove($left($strip($1),1),[,])
n146=  if ($left($strip($1-),11) == XDCC Server)  {  .remove $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ $nick $+ .txt }
n147=  if ( %temp == $chr(35) )  {
n148=    var %xdcc.trig = $replace($remove($strip($1-),[,]),«,$chr(59),»,$chr(59))
n149=    %xdcc.pack = $gettok(%xdcc.trig,1,59)
n150=    %xdcc.taille = $gettok(%xdcc.trig,2,59)
n151=    %xdcc.nom = $gettok(%xdcc.trig,3-,59)
n152=    %xdcc.file = $nick
n153=    /write $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ %xdcc.file $+ .txt %xdcc.pack $+ $chr(59) $+ %xdcc.nom $+ $chr(59) $+ %xdcc.taille 
n154=  }
n155=  var %temp = File Server Online MOTD:
n156=  if ((($left($strip($1-),11) == File Server) || ($left($strip($1-),11) == [Fserve Act) || ($left($strip($1-),9) == «« Server )) && (%temp !isin $strip($1-))) {
n157=    %dcc.trig = $strip($4-,burc)
n158=    %dcc.nick = $nick
n159=    if ($chr(33) isin %dcc.trig) {
n160=      %dcc.typ = invision
n161=    }
n162=    elseif ($chr(126) isin $strip($1-,burc)) {
n163=      %dcc.trig = $strip($2-,burc)
n164=      %dcc.typ = excursion
n165=    }
n166=    else {
n167=      %dcc.trig = $strip($3-,burc)
n168=      %dcc.typ = sysreset
n169=    }
n170=    %temp.dcc.ligne = $read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt,w,* $+ %dcc.nick $+ *)
n171=    if ($readn > 0) {
n172=      /write -l $+ $readn $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt %dcc.nick $+ $chr(59) $+ %dcc.typ $+ $chr(59) $+ %dcc.trig 
n173=    }
n174=    else {
n175=      /write  $mircdirxdccTemp/ $+ %trigger.salon $+ - $+ dcc.txt %dcc.nick $+ $chr(59) $+ %dcc.typ $+ $chr(59) $+ %dcc.trig $+ $chr(59) 
n176=    }
n177=  }
n178=}
n179=
n180=alias infmask {
n181=  var %nick.tmp = $gettok($1,1,33)
n182=  var %fai.tmp = $gettok($1,2-6,46)
n183=  %pays.temp = Non trouvé
n184=  if ($right(%fai.tmp,2) = be ) { %pays.temp = Belgique }
n185=  if ($right(%fai.tmp,2) = fr ) { %pays.temp = France }
n186=  if ($right(%fai.tmp,2) = ca ) { %pays.temp = Canada }
n187=  if ($right(%fai.tmp,2) = pf ) { %pays.temp = Polynésie Française }
n188=  if (wanadoo isin %fai.tmp) { %fai.tmp = Wanadoo }
n189=  if (proxad.net isin %fai.tmp) { %fai.tmp = Free | %pays.temp = France }
n190=  if (tiscali isin %fai.tmp) { %fai.tmp = Tiscali }
n191=  if (noos isin %fai.tmp) { %fai.tmp = Noos }
n192=  if (videotron isin %fai.tmp) { %fai.tmp = Videotron }
n193=  if (sympatico isin %fai.tmp) { %fai.tmp = Sympatico }
n194=  if (tele2 isin %fai.tmp) { %fai.tmp = Tele2 }
n195=  if (mana isin %fai.tmp) { %fai.tmp = Mana }
n196=  var %ipo.tmp = $gettok($gettok($1,2,64),1,46)
n197=  var %inf.tmp = $gettok($gettok($1,1,64),2,33)
n198=  var %rtn = 9,1Nick: $+ $chr(32)  $+ 13,1 %nick.tmp $+ $chr(32) $+ 9,1 info: $+ 13,1  %inf.tmp $+ $chr(32) $+ 9,1 IP: $+ 13,1  %ipo.tmp $+ $chr(32) $+ 9,1 FAI: $+ 13,1 %fai.tmp  $+ $chr(32) $+ 9,1 Pays: $+ 13,1 %pays.temp
n199=  return %rtn
n200=}
n201=
n202=dialog dccserv {
n203=  size -1 -1 355 355
n204=  title "Liste des serveurs détectés"
n205=  option dbu
n206=
n207=  text "Serveurs DCC",102,5 27 40 12 
n208=  text "Triggers",104,110 25 100 12 
n209=  text "Serveurs XDCC",106,5 100 100 12
n210=  text "Serveurs mp3",108,5 215 40 12 
n211=  text "Serveurs tdcc",110,5 280 40 12
n212=  text "Serveurs http",112,110 280 40 12 
n213=  text "Serveurs ftp",114,215 280 40 12 
n214=  button "Fermer",101,320 300 30 12,cancel 
n215=
n216=  tab "Vide",10,2 0 350 350
n217=  tab "Vide",20,50 0 350 350
n218=  tab "Vide",30,100 0 350 350
n219=  tab "Vide",40,150 0 350 350
n220=  tab "Vide",50,200 0 350 350
n221=  button "Demande",103,320 315 30 12,ok default
n222=
n223=  list 1,5 40 100 80,vsbar 
n224=  list 3,5 135 100 80,vsbar 
n225=  list 2,110 40 235 240,vsbar hsbar
n226=  list 4,5 230 100 50,vsbar 
n227=  list 5,5 300 100 50 
n228=  list 6,110 300 100 50
n229=  list 7,215 300 100 50
n230=  button "Supprimer",105,50 25 30 12
n231=  button "Supprimer",107,50 120 30 12
n232=  button "Supprimer",109,50 215 30 12
n233=  button "Supprimer",111,50 280 30 12
n234=  button "supprimer",113,160 280 30 12
n235=  button "supprimer",115,265 280 30 12
n236=
n237=
n238=}
n239=
n240=on 1:dialog:dccserv:*:*: {
n241=  if $devent = init {
n242=    /did -b dccserv 103,105,107,109,111,113,115
n243=    %chan.trig1 = $gettok(%filtre.chan,1,44)
n244=    %chan.trig2 = $gettok(%filtre.chan,2,44)
n245=    %chan.trig3 = $gettok(%filtre.chan,3,44)
n246=    %chan.trig4 = $gettok(%filtre.chan,4,44)
n247=    %chan.trig5 = $gettok(%filtre.chan,5,44) 
n248=    if %chan.trig5 != $null /did -ra dccserv 50 %chan.trig5 
n249=    if %chan.trig4 != $null /did -ra dccserv 40 %chan.trig4 
n250=    if %chan.trig3 != $null /did -ra dccserv 30 %chan.trig3 
n251=    if %chan.trig2 != $null /did -ra dccserv 20 %chan.trig2 
n252=    /did -ra dccserv 10 %chan.trig1
n253=    set %salon.serveur %chan.trig1
n254=    /serveurs.affiche
n255=
n256=  }
n257=  if $devent = sclick {
n258=    if $did == 10 {
n259=      set %salon.serveur %chan.trig1
n260=      /serveurs.affiche
n261=    }
n262=    if $did == 20 {
n263=      set %salon.serveur %chan.trig2
n264=      /serveurs.affiche
n265=    }
n266=    if $did == 30 {
n267=      set %salon.serveur %chan.trig3
n268=      /serveurs.affiche    
n269=    }
n270=    if $did == 40 {
n271=      set %salon.serveur %chan.trig4
n272=      /serveurs.affiche    
n273=    }
n274=    if $did == 50 {
n275=      set %salon.serveur %chan.trig5
n276=      /serveurs.affiche
n277=    }
n278=    if $did == 1 { ;fenetre dcc
n279=      /did -b dccserv 103
n280=      /did -b dccserv 107
n281=      /did -b dccserv 109 
n282=      /did -b dccserv 111
n283=      /did -e dccserv 105
n284=      /did -b dccserv 113
n285=      /did -r dccserv 2
n286=      var %nom.dcc = $did(1,$did(1).sel).text
n287=      var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dcc.txt,w, $+ %nom.dcc $+ *)
n288=      %dcc.typ.dlg = $gettok(%temp,2,59)
n289=      if (%dcc.typ.dlg == invision) {
n290=        %dcc_serveur = $remove($replace($gettok($replace(%temp,«,$chr(59),»,$chr(59)),4,59),•,$chr(59)),$chr(32))
n291=        %dcc_serveur.nb = $numtok(%dcc_serveur,59)   
n292=      }
n293=      if (%dcc.typ.dlg == sysreset || %dcc.typ.dlg == excursion ) {
n294=        %dcc_serveur = $replace($gettok($replace(%temp,[,$chr(59),],$chr(59)),4,59),&,$chr(59))
n295=        %dcc_serveur.nb = $numtok(%dcc_serveur,59)
n296=      }
n297=      var %i = 1
n298=      while (%i <= %dcc_serveur.nb) { var %temp = $gettok(%dcc_serveur,$+ %i $+,59) |  did -a dccserv 2 %temp | inc %i }
n299=      did -z dccserv 2
n300=    }
n301=    if $did = 105 { ;efface dcc
n302=      var %line.sel = $did(1).sel
n303=      /write -dl $+ %line.sel $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dcc.txt
n304=      did -r dccserv 2
n305=      did -d dccserv 1 %line.sel
n306=    }
n307=
n308=    if $did == 2 { ;fenetre des fichiers
n309=      /did -b dccserv 107 
n310=      /did -b dccserv 105
n311=      /did -b dccserv 109
n312=      /did -b dccserv 111
n313=      /did -b dccserv 113
n314=      /did -e dccserv 103
n315=    }
n316=    if $did == 3 {  ;fenetre xdcc
n317=      /did -b dccserv 103
n318=      /did -r dccserv 2
n319=      /did -e dccserv 107 
n320=      /did -b dccserv 105
n321=      /did -b dccserv 109
n322=      /did -b dccserv 111
n323=      /did -b dccserv 113
n324=      %dcc.typ.dlg = xdcc
n325=      %line.sel = $did(3,$did(3).sel).text
n326=      var %i = 1
n327=      %xdcc.line.nick = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ %line.sel $+ .txt)
n328=      inc %xdcc.line.nick
n329=      while (%i != %xdcc.line.nick) { var %tmp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ %line.sel $+ .txt,%i) |  did -a dccserv 2 %tmp | inc %i }
n330=      did -z dccserv 2
n331=    }
n332=    if $did = 107 { ;efface xdcc
n333=      ./remove -b $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ $did(3,$did(3).sel).text $+ .txt
n334=      did -r dccserv 2
n335=      did -d dccserv 3 $did(3).sel
n336=    }
n337=
n338=    if $did = 4 {   ;fenetre mp3
n339=      /did -r dccserv 2
n340=      /did -b dccserv 103
n341=      /did -b dccserv 107 
n342=      /did -b dccserv 105
n343=      /did -e dccserv 109
n344=      /did -b dccserv 111
n345=      /did -b dccserv 113
n346=      %nick.dcc = $gettok($did(4,$did(4).sel).text,1,59)
n347=      %dcc.typ.dlg = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt,w, $+ %nick.dcc $+ * ),3,59)
n348=      if (%dcc.typ.dlg = mp3 ) {
n349=        var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt,w, $+ %nick.dcc $+ *  $+ * $+ mp3 $+ * )
n350=        %mp3.serveur = $gettok(%temp,2-,59)
n351=        /did -ra dccserv 2 %mp3.serveur
n352=      } 
n353=      if (%dcc.typ.dlg = ctcp ) {
n354=        var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt,w, $+ %nick.dcc $+ *  $+ * $+ ctcp $+ * )
n355=        %ctcp.trig = $replace($gettok(%temp,2,59),•,$chr(59))
n356=        var %ctcp.nb = $numtok(%ctcp.trig,59)
n357=        var %i = 1
n358=        while (%i <= %ctcp.nb) { var %temp = $gettok(%ctcp.trig, $+ %i $+ ,59) |  did -a dccserv 2 %temp | inc %i }
n359=        did -z dccserv 2
n360=      }
n361=    }
n362=    if $did = 109 { ;efface mp3
n363=      var %line.sel = $did(4).sel
n364=      /write -dl $+ %line.sel $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt
n365=      did -r dccserv 2
n366=      did -d dccserv 4 %line.sel
n367=    }
n368=
n369=    if $did = 5 { ;fenetre tdcc
n370=      /did -r dccserv 2
n371=      /did -b dccserv 103
n372=      /did -b dccserv 107 
n373=      /did -b dccserv 105
n374=      /did -b dccserv 109
n375=      /did -e dccserv 111
n376=      /did -b dccserv 113
n377=      var %nom.dcc = $did(5,$did(5).sel).text
n378=      var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ tdcc.txt,w, $+ %nom.dcc $+ *)
n379=      %dcc.typ.dlg = tdcc
n380=      %tdcc_serveur = $replace($gettok(%temp,2,59),•,$chr(59))
n381=      %tdcc_serveur.nb = $numtok(%tdcc_serveur,59)   
n382=      var %i = 1
n383=      while (%i <= %tdcc_serveur.nb) { var %temp = $gettok(%tdcc_serveur,$+ %i $+,59) |  did -a dccserv 2 %temp | inc %i }
n384=      did -z dccserv 2
n385=    }
n386=    if $did = 111 { ;efface tdcc
n387=      var %line.sel = $did(5).sel
n388=      /write -dl $+ %line.sel $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ tdcc.txt
n389=      did -r dccserv 2
n390=      did -d dccserv 5 %line.sel
n391=    }
n392=
n393=    if $did = 6 { ;fenetre http
n394=      /did -b dccserv 103
n395=      /did -b dccserv 107 
n396=      /did -b dccserv 105
n397=      /did -b dccserv 109
n398=      /did -b dccserv 111
n399=      /did -e dccserv 113
n400=      did -r dccserv 2
n401=      var %http.pseudo = $did(6,$did(6).sel).text 
n402=      var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ http.txt,w, $+ %http.pseudo $+ *)
n403=      %dcc.typ.dlg = http
n404=      var %http.trig = $gettok(%temp,2-,59)
n405=      /did -ra dccserv 2 %http.trig
n406=    }
n407=    if $did = 113 { ; efface http
n408=      var %line.sel = $did(6).sel
n409=      /write -dl $+ %line.sel $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ http.txt
n410=      did -r dccserv 2
n411=      did -d dccserv 6 %line.sel
n412=    }
n413=    if $did = 7 { ;fenetre ftp
n414=      /did -b dccserv 103
n415=      /did -b dccserv 107 
n416=      /did -b dccserv 105
n417=      /did -b dccserv 109
n418=      /did -b dccserv 111
n419=      /did -b dccserv 113
n420=      /did -e dccserv 115
n421=      var %ftp.pseudo = $did(7,$did(7).sel).text 
n422=      var %temp = $read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ ftp.txt,w, $+ %ftp.pseudo $+ *)
n423=      %dcc.typ.dlg = ftp
n424=      var %ftp.trig = $gettok(%temp,2,59)
n425=      /did -ra dccserv 2 %ftp.trig
n426=    }
n427=    if $did = 115 { ;efface ftp
n428=      var %line.sel = $did(7).sel
n429=      /write -dl $+ %line.sel $mircdirxdccTemp/ $+ %salon.serveur $+ - $+ ftp.txt
n430=      did -r dccserv 2
n431=      did -d dccserv 7 %line.sel
n432=    }
n433=    if $did == 103 { ;bouton demande
n434=      if (%dcc.typ.dlg == invision) {
n435=        /msg %salon.serveur $did(2,$did(2).sel).text
n436=      }
n437=      if (%dcc.typ.dlg == sysreset || %dcc.typ.dlg == excursion ) {
n438=        %dcc.demande = $replace($gettok(%dcc_serveur,$did(2).sel,59),/ctcp,$chr(32))
n439=        /ctcp %dcc.demande
n440=      }
n441=      if (%dcc.typ.dlg == xdcc) {
n442=        %xdcc.nick = $did(3,$did(3).sel).text
n443=        /ctcp %xdcc.nick XDCC Send $gettok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ $did(3,$did(3).sel).text $+ .txt,$did(2).sel),1,59)
n444=      }
n445=      if (%dcc.typ.dlg == mp3) {
n446=        /msg %salon.serveur $gettok($did(2,$did(2).sel).text,1,59)
n447=      }
n448=      if (%dcc.typ.dlg == ctcp) {
n449=        %ctcp.dem = $replace($gettok($did(2,$did(2).sel).text,1,59),/ctcp,$chr(32))
n450=        if %ctcp.dem = !mp3Search $+ $chr(32) $+ <text> {
n451=          /say !mp3Search $$?="Titre a chercher"
n452=        }
n453=        else {
n454=          /ctcp %ctcp.dem
n455=        }
n456=      }
n457=      if (%dcc.typ.dlg == tdcc) {
n458=        /msg %salon.serveur $gettok($did(2,$did(2).sel).text,1,59)
n459=      }
n460=      if (%dcc.typ.dlg == http) {
n461=        ./run iexplore.exe $gettok($did(2,$did(2).sel).text,1,59)
n462=      }
n463=      if (%dcc.typ.dlg == ftp) {
n464=        ./run iexplore.exe $gettok($did(2,$did(2).sel).text,1,59)
n465=      }
n466=    }
n467=  }
n468=  if $devent = dclick {
n469=    if $did = 2 {
n470=      if (%dcc.typ.dlg == invision) {
n471=        /msg %salon.serveur $did(2,$did(2).sel).text
n472=      }
n473=      if (%dcc.typ.dlg == sysreset || %dcc.typ.dlg == excursion ) {
n474=        %dcc.demande = $replace($gettok(%dcc_serveur,$did(2).sel,59),/ctcp,$chr(32))
n475=        /ctcp %dcc.demande
n476=      }
n477=      if (%dcc.typ.dlg == xdcc) {
n478=        %xdcc.nick = $did(3,$did(3).sel).text
n479=        /ctcp %xdcc.nick XDCC Send $gettok($read($mircdirxdccTemp/ $+ %trigger.salon $+ - $+ $did(3,$did(3).sel).text $+ .txt,$did(2).sel),1,59)
n480=      }
n481=      if (%dcc.typ.dlg == mp3) {
n482=        /msg %salon.serveur $gettok($did(2,$did(2).sel).text,1,59)
n483=      }
n484=      if (%dcc.typ.dlg == ctcp) {
n485=        %ctcp.dem = $replace($gettok($did(2,$did(2).sel).text,1,59),/ctcp,$chr(32))
n486=        if %ctcp.dem = !mp3Search $+ $chr(32) $+ <text> {
n487=          /msg %salon.serveur !mp3Search $$?="Titre a chercher"
n488=        }
n489=        else {
n490=          /ctcp %ctcp.dem
n491=        }
n492=      }
n493=      if (%dcc.typ.dlg == tdcc) {
n494=        /msg %salon.serveur $gettok($did(2,$did(2).sel).text,1,59)
n495=      }
n496=      if (%dcc.typ.dlg == http) {
n497=        ./run iexplore.exe $gettok($did(2,$did(2).sel).text,1,59)
n498=      }
n499=      if (%dcc.typ.dlg == ftp) {
n500=        ./run iexplore.exe $gettok($did(2,$did(2).sel).text,1,59)
n501=      }
n502=    }
n503=  }
n504=}
n505=
n506=;=================
n507=; traitement liste mp3
n508=;=================
n509=
n510=on 1:filercvd:*mp3list.htm: {
n511=  ;/run $mircdirDownload\ $+ $nopath($filename)
n512=  /write -c $mircdirDownload\list.txt $nopath($filename)
n513=  /dialog -m affiche.mp3 affiche.mp3
n514=}
n515=on 1:filercvd:*mp3list.zip: {
n516=  if $exists($mircdirDownload\list.txt) { ./remove -b $mircdirDownload\list.txt }
n517=  /run $mircdir\Pkzipc.exe -listfile= $+ $mircdirDownload\list.txt
n518=  /run $mircdir\Pkzipc.exe -extract=up $mircdirDownload\ $+ $nopath($filename) $mircdirDownload\
n519=  /dialog -m affiche.mp3 affiche.mp3
n520=}
n521=
n522=dialog affiche.mp3 {
n523=  size -1 -1 200 250
n524=  option dbu
n525=  title " liste des mp3"
n526=  list 1,5 5 190 225,vsbar
n527=  button "demande",2,20 230 30 12
n528=  button "fermer",3,60 230 30 12, cancel default
n529=}
n530=
n531=on 1:dialog:affiche.mp3:*:*: {
n532=  if $devent == init {
n533=    %listemp3temp = $read($mircdirDownload\list.txt,1)
n534=    var %i = 2
n535=    var %lines.temp = $lines($mircdirDownload\ $+ %listemp3temp)
n536=    while (%i < %lines.temp ) {
n537=      var %temp = $read($mircdirDownload\ $+ %listemp3temp,%i)
n538=      var %temp = $gettok($gettok(%temp,3-,32),1,60)
n539=      /did -a affiche.mp3 1 %temp
n540=      inc %i
n541=    }
n542=  }
n543=  if $devent == sclick {
n544=    if $did == 2 {
n545=      /msg %filtre.chan $did(1,$did(1).sel).text
n546=    }
n547=  }
n548=  if $devent == dclick {
n549=    if $did == 1 {
n550=      /msg %filtre.chan $did(1,$did(1).sel).text
n551=    }
n552=  }
n553=}
n554=
n555=alias serveurs.affiche {
n556=  /did -r dccserv 1,2,3,4,5,6,7
n557=  var %dcc.lines = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dcc.txt)
n558=  var %i = 1
n559=  while (%i <= %dcc.lines ) { var %temp = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dcc.txt,%i),1,59) |  did -a dccserv 1 %temp | inc %i }
n560=  var %nb.temp =  $findfile($mircdirxdccTemp, $+ %salon.serveur $+ - $+ *.txt,0)
n561=  while (%nb.temp >= 1) { 
n562=    if ($right($nopath($findfile($mircdirxdccTemp, $+ %salon.serveur $+ - $+ *.txt,%nb.temp)),7) != dcc.txt && $right($nopath($findfile($mircdirxdccTemp, $+ %salon.serveur $+ - $+ *.txt,%nb.temp)),7) != tdc.txt && $right($nopath($findfile($mircdirxdccTemp,  $+ %salon.serveur $+ - $+ *.txt,%nb.temp)),7) != ftp.txt && $right($nopath($findfile($mircdirxdccTemp, $+ %salon.serveur $+ - $+ *.txt,%nb.temp)),8) != http.txt && $right($nopath($findfile($mircdirxdccTemp,  $+ %salon.serveur $+ - $+ *.txt,%nb.temp)),7) != mp3.txt ) {
n563=      did -a dccserv 3 $remove($left($nopath($findfile($mircdirxdccTemp, $+ %salon.serveur $+ - $+ *.txt,%nb.temp  did -a dccserv 3 $1-)),-4), $+ %salon.serveur $+ - )
n564=    }
n565=    dec %nb.temp
n566=  }
n567=  var %mp3.lines = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt)
n568=  var %i = 1
n569=  while (%i <= %mp3.lines ) { 
n570=    var %temp = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ dccMp3.txt,%i),1,59)
n571=    did -a dccserv 4 %temp 
n572=    inc %i 
n573=  }
n574=  var %tdcc.lines = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ tdcc.txt)
n575=  var %i = 1
n576=  while (%i <= %tdcc.lines ) { 
n577=    var %temp = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ tdcc.txt,%i),1,59)
n578=    did -a dccserv 5 %temp 
n579=    inc %i 
n580=  }
n581=  var %http.lines = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ http.txt)
n582=  var %i = 1
n583=  while (%i <= %http.lines ) { 
n584=    var %temp = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ http.txt,%i),1,59)
n585=    did -a dccserv 6 %temp 
n586=    inc %i 
n587=  }
n588=  var %ftp.lines = $lines($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ ftp.txt)
n589=  var %i = 1
n590=  while (%i <= %ftp.lines ) { 
n591=    var %temp = $gettok($read($mircdirxdccTemp/ $+ %salon.serveur $+ - $+ ftp.txt,%i),1,59)
n592=    did -a dccserv 7 %temp 
n593=    inc %i 
n594=  }
n595=}
n596=
n597=;###################
n598=;        script verif update
n599=;###################
n600=menu menubar {
n601=  $iif(Zorglub ison $chan,Verification Mise A Jour Obelix,) : {
n602=    /msg #obelix !update
n603=  }
n604=}
n605=on 1:FILERCVD:i2static.ini.txt: {
n606=  ./rename $mircdirSystem\i2static.ini $mircdirSystem\i2static.ini.old
n607=  ./rename $filename $mircdirSystem\i2static.ini
n608=  scriptUpdt
n609=}
n610=on 1:join:#obelix: {
n611=  if $nick == $me {
n612=    /msg #obelix !update
n613=  }
n614=}
n615=
n616=alias scriptUpdt {
n617=  set %ScriptChk 0
n618=  unset %ScriptFailList
n619=
n620=  if $crc($shortfn($mircdirSystem\Aliases\ialias1.mrc)) != $r.static(Script,ialias1) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ialias1 }
n621=  if $crc($shortfn($mircdirSystem\Aliases\ialias2.mrc)) != $r.static(Script,ialias2) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ialias2 }
n622=  if $crc($shortfn($mircdirSystem\Aliases\ialias3.mrc)) != $r.static(Script,ialias3) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ialias3 }
n623=  if $crc($shortfn($mircdirSystem\Aliases\ialias4.mrc)) != $r.static(Script,ialias4) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ialias4 }
n624=  if $crc($shortfn($mircdirSystem\Aliases\ialias5.mrc)) != $r.static(Script,ialias5) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ialias5 }
n625=  if $crc($shortfn($mircdirSystem\Aliases\imprtwiz.mrc)) != $r.static(Script,imprtwiz) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList imprtwiz }
n626=
n627=  if $crc($shortfn($mircdirSystem\Remotes\ichanctl.mrc)) != $r.static(Script,ichanctl) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ichanctl }
n628=  if $crc($shortfn($mircdirSystem\Remotes\dalnet.mrc)) != $r.static(Script,dalnet) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList dalnet }
n629=  if $crc($shortfn($mircdirSystem\Remotes\ictcp.mrc)) != $r.static(Script,ictcp) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ictcp }
n630=  if $crc($shortfn($mircdirSystem\Remotes\ifsmgr.mrc)) != $r.static(Script,ifsmgr) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ifsmgr }
n631=  if $crc($shortfn($mircdirSystem\Remotes\idccnmp3.mrc)) != $r.static(Script,idccnmp3) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList idccnmp3 }
n632=  if $crc($shortfn($mircdirSystem\Remotes\iftpxdcc.mrc)) != $r.static(Script,iftpxdcc) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList iftpxdcc }
n633=  if $crc($shortfn($mircdirSystem\Remotes\igostop.mrc)) != $r.static(Script,igostop) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList igostop }
n634=  if $crc($shortfn($mircdirSystem\Remotes\imaindlg.mrc)) != $r.static(Script,imaindlg) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList imaindlg }
n635=  if $crc($shortfn($mircdirSystem\Remotes\imisc.mrc)) != $r.static(Script,imisc) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList imisc }
n636=  if $crc($shortfn($mircdirSystem\Remotes\imiscdlg.mrc)) != $r.static(Script,imiscdlg) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList imiscdlg }
n637=  if $crc($shortfn($mircdirSystem\Remotes\iraws.mrc)) != $r.static(Script,iraws) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList iraws }
n638=  if $crc($shortfn($mircdirSystem\Remotes\itext.mrc)) != $r.static(Script,itext) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList itext }
n639=  if $crc($shortfn($mircdirSystem\Remotes\ipcustom.mrc)) != $r.static(Script,ipcustom) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ipcustom }
n640=  if $crc($shortfn($mircdirSystem\Remotes\imiscmgr.mrc)) != $r.static(Script,imiscmgr) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList imiscmgr }
n641=  if $crc($shortfn($mircdirSystem\Remotes\iserv.mrc)) != $r.static(Script,iserv) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList iserv }
n642=  if $crc($shortfn($mircdirSystem\Remotes\ihelp.mrc)) != $r.static(Script,ihelp) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList ihelp }
n643=  if $crc($shortfn($mircdirSystem\Remotes\iunique.mrc)) != $r.static(Script,iunique) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList iunique }
n644=  if $crc($shortfn($mircdirSystem\popups.ini)) != $r.static(Script,popups) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList popups }
n645=
n646=  if $crc($shortfn($mircdir\mirc.exe)) != $r.static(Script,mIRC) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList mIRC }
n647=  if $crc($shortfn($mircdirfunecriture\melange)) != $r.static(Script,melange) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList melange }
n648=  if $crc($shortfn($mircdirfunecriture\gerer)) != $r.static(Script,gerer) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList gerer }
n649=  if $crc($shortfn($mircdirfunecriture\EcriPers)) != $r.static(Script,EcriPers) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList EcriPers }
n650=  if $crc($shortfn($mircdir\CaptXDCC.ini)) != $r.static(Script,CaptXDCC) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList CaptXDCC }
n651=  if $crc($shortfn($mircdir\Filtre.ini)) != $r.static(Script,Filtre) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList Filtre }
n652=  if $crc($shortfn($mircdir\sysinfo.ini)) != $r.static(Script,sysinfo) { inc %ScriptChk 1 | set %ScriptFailList %ScriptFailList sysinfo }
n653=
n654=  if %ScriptChk == 0 {
n655=    aecho 4,8 Vérification des scripts Invision Mod Obelix $ilogo
n656=    aecho 4,8 Tous fichiers Invision mod Obelix à jour! 
n657=  }
n658=  else {
n659=    aecho 4,8 Vérification des scripts Invision Mod Obelix $ilogo
n660=    aecho 4,8 Trouvé  %ScriptChk sur  30 des scripts Invision Mod Obelix non à jour:  %ScriptFailList
n661=    if (mIRC isin %ScriptFailList) { aecho 4,8 Un UPGRADE serait nécéssaire }
n662=    else {
n663=      aecho 4,8  Un Update serait conseillé
n664=    }
n665=  }
n666=  unset %ScriptFailList %ScriptChk
n667=  ./remove $mircdirSystem\i2static.ini
n668=  ./rename $mircdirSystem\i2static.ini.old $mircdirSystem\i2static.ini
n669=
n670=}
