alias antipv { dialog -md antipv antipv } dialog antipvmsg { title "Antipv : messages ignorés" size -1 -1 227 82 option dbu box "Liste des messages (de spam) à ignorer", 1, 0 1 226 51 list 2, 2 9 222 42, size hsbar edit "", 3, 1 52 226 10, disable autohs edit "", 4, 1 62 225 10, autohs button "ajouter", 5, 2 72 37 10 button "modifier", 6, 40 72 37 10 button "supprimer", 7, 78 72 39 10 button "", 8, 1000 1000 1 1, ok } on *:dialog:antipvmsg:init:*:{ setmdx $dname /dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetBorderStyle 2,5,6,7,3,4 clientedge listantipvmsg } alias listantipvmsg { did -r antipvmsg 2,3,4 /dll $shortfn($mircdiranti-pv/dll/nCluf.dll) nCluf $shortfn($mircdiranti-pv/listmsg.txt) $+ >did -a antipvmsg 2 $!1- } on *:dialog:antipvmsg:sclick:*:{ if ( $did = 2 ) { did -ra antipvmsg 3,4 $did(2).seltext } if ( $did = 7 ) { if ( $did(2).seltext != $null ) { write -dl $+ $did(2).sel $shortfn($mircdiranti-pv/listmsg.txt) listantipvmsg } } if ( $did = 6 ) { if ( $did(2).seltext != $null ) { write -l $+ $did(2).sel $shortfn($mircdiranti-pv/listmsg.txt) $$did(4) listantipvmsg } } if ( $did = 5 ) { write $shortfn($mircdiranti-pv/listmsg.txt) $$did(4) listantipvmsg } } dialog antipv { title "Gestionnaire des discussions privées" size -1 -1 225 136 option dbu button "Button", 1, 57 10 166 43 box "messages laissés par l'inconnu", 2, 54 1 171 54 list 3, 2 10 47 43, size box "Les inconnus", 4, 1 1 50 54 text "Pour cette personne, quelle action faire ?", 5, 3 57 103 8 button "l'ignorer", 6, 109 56 37 10 button "accepter", 7, 148 56 37 10 button "refuser", 8, 186 56 38 10 button "messages ignorés", 9, 1 67 52 10 check "accepter pv des salons ou on est @ dessus", 11, 96 67 128 10, push button "liste des amis", 10, 55 67 38 10 box "Configuration des messages de répondeur : message pour les admis et amis, et le filtre", 12, 0 78 225 46 edit "", 13, 1 85 167 10, autohs text "message de filtrage", 14, 167 86 56 8 edit "", 15, 1 94 167 10, autohs text "message d'admis", 16, 167 95 56 8 edit "", 17, 1 103 167 10, autohs text "message de refus", 18, 167 104 56 8 button "enregistrer", 19, 3 113 40 10 text " = nombre de pv, = nombre de salon = son pseudo", 20, 43 114 181 8 text "couleurs des infos", 21, 15 126 47 8 combo 22, 69 125 50 51, size combo 23, 120 125 50 50, size combo 24, 171 125 50 50, size button "", 100, 1000 1000 1 1, ok } alias setmdx { dll $shortfn($mircdiranti-pv//dll/mdx.dll) MarkDialog $1 | dll $shortfn($mircdiranti-pv//dll/mdx.dll) SetMircVersion $version } on *:dialog:antipv:init:*:{ setmdx $dname .window -hm @antipv .dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetBorderStyle 2,3,4,6,7,9,8,11,10,19 clientedge .dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetControlMDX $dname 1 window > $shortfn($mircdiranti-pv/dll/dialog.mdx) .did -a $dname 1 grab $window(@antipv).hwnd @antipv listpv if ( %antipvmod == on ) /did -c antipv 11 did -a antipv 13 %antipvmsgfiltre did -a antipv 15 %antipvmsgadmis did -a antipv 17 %antipvmsgrefus dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetControlMDX $dname 22 ComboBoxEx drop > $shortfn($mircdiranti-pv/dll/Views.mdx) dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetControlMDX $dname 23 ComboBoxEx drop > $shortfn($mircdiranti-pv/dll/Views.mdx) dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetControlMDX $dname 24 ComboBoxEx drop > $shortfn($mircdiranti-pv/dll/Views.mdx) did -i $dname 22 1 iconsize small loadicon $dname 22 did -a $dname 22 0 0 Blanc did -a $dname 22 1 1 Noir did -a $dname 22 2 2 Bleu Foncé did -a $dname 22 3 3 Vert did -a $dname 22 4 4 Rouge did -a $dname 22 5 5 Marron did -a $dname 22 6 6 Violet did -a $dname 22 7 7 Orange did -a $dname 22 8 8 Jaune did -a $dname 22 9 9 Vert Clair did -a $dname 22 10 10 Bleu Vert did -a $dname 22 11 11 Bleu Clair did -a $dname 22 12 12 Bleu did -a $dname 22 13 13 Rose did -a $dname 22 14 14 Gris did -a $dname 22 15 15 Gris Clair did -i $dname 23 1 iconsize small loadicon $dname 23 did -a $dname 23 0 0 Blanc did -a $dname 23 1 1 Noir did -a $dname 23 2 2 Bleu Foncé did -a $dname 23 3 3 Vert did -a $dname 23 4 4 Rouge did -a $dname 23 5 5 Marron did -a $dname 23 6 6 Violet did -a $dname 23 7 7 Orange did -a $dname 23 8 8 Jaune did -a $dname 23 9 9 Vert Clair did -a $dname 23 10 10 Bleu Vert did -a $dname 23 11 11 Bleu Clair did -a $dname 23 12 12 Bleu did -a $dname 23 13 13 Rose did -a $dname 23 14 14 Gris did -a $dname 23 15 15 Gris Clair did -i $dname 24 1 iconsize small loadicon $dname 24 did -a $dname 24 0 0 Blanc did -a $dname 24 1 1 Noir did -a $dname 24 2 2 Bleu Foncé did -a $dname 24 3 3 Vert did -a $dname 24 4 4 Rouge did -a $dname 24 5 5 Marron did -a $dname 24 6 6 Violet did -a $dname 24 7 7 Orange did -a $dname 24 8 8 Jaune did -a $dname 24 9 9 Vert Clair did -a $dname 24 10 10 Bleu Vert did -a $dname 24 11 11 Bleu Clair did -a $dname 24 12 12 Bleu did -a $dname 24 13 13 Rose did -a $dname 24 14 14 Gris did -a $dname 24 15 15 Gris Clair did -c $dname 22 $calc(%Cl1 + 2) did -c $dname 24 $calc(%Cl3 + 2) did -c $dname 23 $calc(%Cl2 + 2) } alias loadicon { var %x = 1 while ( %x <= 15 ) { did -i $1 $2 1 seticon 0 $shortfn($mircdiranti-pv/images/ $+ %x $+ .ico) inc %x } } on *:start:{ if ( %cl1 == $null ) /set %cl1 2 if ( %cl2 == $null ) /set %cl2 4 if ( %cl3 == $null ) /set %cl3 3 if ( %antipvmsgadmis == $null ) /set %antipvmsgadmis Bonjour, veuillez patienter , je dispose de PV et je suis sur salons. if ( %antipvmsgfiltre == $null ) /set %antipvmsgfiltre Bonjour, je dispose d'un anti-pv, veuillez patientez s'il vous plait. if ( %antipvmsgrefus == $null ) /set %antipvmsgrefus Je suis Désolé, mais je ne vous prends pas en PV, n'essayez pas d'insister, vous êtes en ignore temporaire. if ( $ulist(*,2,0) != $null) .rlevel -r 2 if ( $ulist(*,3,0) != $null) .rlevel -r 3 var %x = 1 if ( $findfile($shortfn($mircdiranti-pv/antipv),*,0) != 0 ) { while ( %x <= $findfile($shortfn($mircdiranti-pv/antipv),*,0) ) { .remove $nopath($findfile($shortfn($mircdiranti-pv/antipv),*,%x)) inc %x } } } alias listpv { write -c listpv.txt did -r antipv 3 var %x = 1 if ( $findfile($shortfn($mircdiranti-pv/antipv),*,0) != 0 ) { while ( %x <= $findfile($shortfn($mircdiranti-pv/antipv),*,0) ) { write listpv.txt $nopath($findfile($shortfn($mircdiranti-pv/antipv),*,%x)) did -a antipv 3 $nopath($gettok($findfile($shortfn($mircdiranti-pv/antipv),*,%x),1,64)) inc %x } } } on *:dialog:antipv:sclick:*:{ if ( $did == 19 ) { set %antipvmsgfiltre $$did(13) set %antipvmsgadmis $$did(15) set %antipvmsgrefus $$did(17) } if ( $did = 10 ) /dialog -m amis amis if ( $did = 3 ) { /set %fichier $read($shortfn(listpv.txt),$did(antipv,3).sel) clear @antipv var %file = $shortfn($mircdiranti-pv/antipv/ $+ %fichier ) /dll $shortfn($mircdiranti-pv/dll/nCluf.dll) nCluf %file $+ >echo 2 @antipv $!1- } if ( $did = 7 ) { var %nick = $gettok(%fichier,1,64) var %scid = $gettok(%fichier,2,64) scid %scid accepter %scid %nick clear @antipv } if ( $did == 22 ) set %cl1 $calc($did(22).sel - 2) if ( $did == 23 ) set %cl2 $calc($did(23).sel - 2) if ( $did == 24 ) set %cl3 $calc($did(24).sel - 2) if ( $did = 9 ) { dialog -md antipvmsg antipvmsg } if ( $did = 8 ) { var %nick = $gettok(%fichier,1,64) var %scid = $gettok(%fichier,2,64) .remove $shortfn($mircdiranti-pv/antipv/ $+ %fichier ) .ruser 2 $replace(%nick,!,$chr(124)) clear @antipv listpv .scid %scid .msg $replace($gettok(%fichier,1,64),!,$chr(124)) $replace(%antipvmsgrefus,,$nick,,$chan(0),,$query(0)) ignore -pu120 $replace($gettok(%fichier,1,64),!,$chr(124)) } if ( $did = 11 ) { if ( $did(11).state == 1 ) { /set %antipvmod on } if ( $did(11).state == 0 ) { /set %antipvmod off } } if ( $did = 6 ) { var %nick = $gettok(%fichier,1,64) var %scid = $gettok(%fichier,2,64) ignore -pu3000 $replace($gettok(%fichier,1,64),!,$chr(124)) .remove $shortfn($mircdiranti-pv/antipv/ $+ %fichier ) listpv clear @antipv } } on 1:open:?:{ if ( $nick == $null ) /halt var %a = 1 var %text = $strip($1-) while (%a <= $lines($shortfn($mircdiranti-pv/listmsg.txt)) ) { if ( $read($shortfn($mircdiranti-pv/listmsg.txt),%a) isin %text ) { ignore -pu3000 $nick ignore -pu3000 $nick $+ *!*@* close -m $nick echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ ANTI-PV $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 a éte ignoré pour message indésirable en pv. halt } inc %a } if ( *psyBNC* iswm $nick ) /halt if ( %antipvmod == on ) { var %x = 1 while ( %x <= $chan(0) ) { if ( $me isop $chan(%x) ) && ( $nick ison $chan(%x) ) { echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ P-V $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 veut te parler en privé. ./auser -a 3 $nick .msg $nick $replace(%antipvmsgadmis,,$nick,,$chan(0),,$query(0)) if ( %sound == ON ) .splay $read($shortfn($mircdiranti-pv/listson),s,pv) ./goto exit } inc %x } echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ P-V $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 veut te parler en privé. .msg $nick $replace(%antipvmsgfiltre,,$nick,,$chan(0),,$query(0)) ./write anti-pv/antipv/ $+ $replace($nick,$chr(124),!) $+ @ $+ $cid $timestamp  $+ %cl1 $+ < $+ $nick $+ > $+ %cl4 $1- ./auser -a 2 $nick close -m $nick if ($dialog(antipv) != $null ) { listpv } else { dialog -md antipv antipv } :exit } else { echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ P-V $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 veut te parler en privé. .msg $nick $replace(%antipvmsgfiltre,,$nick,,$chan(0),,$query(0)) if (($away == $true) && (%Away.log == on)) { .msg $nick 2 De plus, Je suis absent [ Raison:4 %Away.temp.r 2] [ Parti Depuis:4 $duration($calc($ctime - %Away.temp.ctime)) 2] [ LoG:4 %away.log 2] if ( $dialog(awaysysteme) != $null ) { /readaway | /did -a awaysysteme 10 Revenir } } ./write anti-pv/antipv/ $+ $replace($nick,$chr(124),!) $+ @ $+ $cid $timestamp  $+ %cl1 $+ < $+ $nick $+ > $+ %cl4 $1- ./auser -a 2 $nick close -m $nick if ($dialog(antipv) != $null ) { listpv } else { dialog -md antipv antipv } } } on 2:open:?:{ ./write anti-pv/antipv/ $+ $replace($nick,$chr(124),!) $+ @ $+ $cid $timestamp  $+ %cl1 $+ < $+ $nick $+ > $+ %cl4 $1- close -m $nick if ($dialog(antipv) != $null ) { listpv } else { dialog -md antipv antipv } } on 3:open:?:{ .msg $nick $replace(%antipvmsgadmis,,$nick,,$chan(0),,$query(0)) echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ PV-ADMIS $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 veut te parler, vous l'avez déjà accepté auparavant. } on 5:open:?:{ .msg $nick $replace(%antipvmsgadmis,,$nick,,$chan(0),,$query(0)) echo %cl4 -a $timestamp  $+ %cl2 $+ ( $+ %cl1 $+ PV-AMIS $+ %cl2 $+ ) $+ %cl1 $nick  $+ %cl3 $+ ( $+ $address $+ ) $+ %cl1 veut te parler, c'est un ami. } dialog amis { title "Liste de vos amis" size -1 -1 84 62 option dbu list 1, 0 1 84 50, size button "ajouter", 2, 1 52 32 10 button "supprimer", 3, 52 52 30 10 button "", 8, 1000 1000 1 1, ok } on *:dialog:amis:init:*:{ setmdx $dname /dll $shortfn($mircdiranti-pv/dll/mdx.dll) SetBorderStyle 2,3 clientedge var %x = 1 while ( %x <= $ulist(*,5,0) ) { did -a amis 1 $ulist(*,5,%x) inc %x } } on *:dialog:amis:sclick:*:{ if ( $did == 3 ) && ( $did(1).seltext != $null ) { /ruser 5 $did(1).seltext did -d amis 1 $did(1).sel } if ( $did == 2 ) { /auser 5 $$?="Indiquer le pseudo ou host d'un de vos amis, un host est sous la forme pseudo!ident@host (vous pouvez remplacer l'un des mot par *...)" did -a amis 1 $! } } alias accepter { /scid $1 var %nick = $replace($2,!,$chr(124)) ./msg %nick Votre PV est accepté, je vous réponds de suite ./auser -a 3 %nick ./query %nick var %a = 1 while (%a <= $lines(anti-pv/antipv/ $+ $2 $+ @ $+ $1) ) { ..echo %nick $read(anti-pv/antipv/ $+ $2 $+ @ $+ $1,%a) inc %a } .remove $shortfn($mircdiranti-pv/antipv/ $+ $2 $+ $chr(64) $+ $1) listpv } menu menubar,channel,nicklist { - anti-pv :/dialog -m antipv antipv liste d'amis :/dialog -m amis amis }