Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

GESTIONNAIRE DE HIGHLIGHT AVANCÉ AVEC IGNORE SALON OU PSEUDO

Recommended Posts

  • Administrators

GESTIONNAIRE DE HIGHLIGHT AVANCÉ AVEC IGNORE SALON OU PSEUDO

 

Gestionnaire de HighLight avancé avec la possibilité d'ignorer les HL d'un pseudo particulier ou d'un salon entier.

 

Les ignores peuvent se faire par le dialog ainsi que par le clic droit sur le salon ou sur le pseudo.

 

Possibilité de choisir un son .wav ou .mp3 différent pour le hl pv et le hl salon, possibilité d'activé ou de désactivé se son.

 

Possibilité de personnalisé sa phrase de HL.

 

>1.on *:start:{2.  hmake hl 10003.  hload hl hl.dou4.}5.on *:exit:{6.  hsave -o hl hl.dou7.}8.ON 1:LOAD:{ hmake hl 1000 }9.dialog hl {10.  title "HL Avancé"11.  size -1 -1 169 18912.  option dbu13.  box "Liste des pseudos ignorés", 1, 6 3 79 11614.  list 2, 9 12 73 103, size15.  box "Liste des salons ignorés", 3, 87 3 79 11616.  list 4, 89 12 73 103, size17.  box "Pseudos", 5, 6 120 79 2318.  edit "", 6, 9 129 73 1019.  button "Ajouter", 7, 6 146 37 1220.  button "Modifier", 8, 67 146 37 1221.  button "Supprimer", 9, 128 146 37 1222.  box "Salon", 10, 87 120 79 2323.  edit "", 11, 89 130 73 1024.  check "Son activé", 12, 5 162 50 1025.  button "Son Salon", 13, 67 162 37 1226.  button "Son Privé", 14, 128 162 37 1227.  button "Phrase de HL", 15, 128 176 37 1228.}29.menu channel,nicklist {30.  Hl Avancé31.  .Ouvrir Le Dialog:dialog -m hl hl32.  .Pseudo33.  ..Ajouter $$1:{34.    $add.pse($1)35.    hsave -o hl hl.dou36.  }37.  ..Supprimer $$1:{38.    $sup.pse($1)39.    hsave -o hl hl.dou40.  }41.  .Salon42.  ..Ajouter $active:{43.    $add.cha($active)44.    hsave -o hl hl.dou45.  }46.  ..Supprimer $active:{47.    $sup.cha($active)48.    hsave -o hl hl.dou49.  }50.}51.on *:dialog:hl:*:*: {52.  if $devent == init {53.    didtok $dname 2 44 $hget(hl,pseudo) 54.    didtok $dname 4 44 $hget(hl,salon) 55.    if %play.son { did -c $dname 12 }56.  }57.  if $devent == close {58.   $iif($did(12).state,set,unset) %play.son 1 59.  }60.  if $devent == sclick {61.    if $did == 15 { dialog -m phhl phhl }62.    if $did == 13 { set %son.cha $sfile(C:\,Choisissez un *.mp3 ou *.wav,Valider) }63.    if $did == 14 { set %son.pv $sfile(C:\,Choisissez un *.mp3 ou *.wav,Valider) }64.    if $did == 9 {65.      if $did(2).sel { hadd -m hl pseudo $remtok($hget(hl,pseudo),$wildtok($hget(hl,pseudo),$did(2).seltext,1,44),1,44) | hsave -o hl hl.dou }66.      if $did(4).sel { hadd -m hl salon $remtok($hget(hl,salon),$wildtok($hget(hl,salon),$did(4).seltext,1,44),1,44) | hsave -o hl hl.dou }67.      did -r $dname 2,468.      didtok $dname 2 44 $hget(hl,pseudo) 69.      didtok $dname 4 44 $hget(hl,salon) 70.    }71.    if $did == 7 {72.      if $did(6) { hadd -m hl pseudo $+($hget(hl,pseudo),$chr(44),$did(6)) | hsave -o hl hl.dou }73.      if $did(11) { hadd -m hl salon $+($hget(hl,salon),$chr(44),$did(11)) | hsave -o hl hl.dou }74.      did -r $dname 2,4,6,1175.      didtok $dname 2 44 $hget(hl,pseudo) 76.      didtok $dname 4 44 $hget(hl,salon) 77.    }78.    if $did == 8 {79.      if $did(2).sel && $did(6) {80.        hadd -m hl pseudo $reptok($hget(hl,pseudo),$wildtok($hget(hl,pseudo),$did(2).seltext,1,44),$did(6),1,44)81.        hsave -o hl hl.dou82.      }83.      if $did(4).sel && $did(11) {84.        hadd -m hl salon $reptok($hget(hl,salon),$wildtok($hget(hl,salon),$did(4).seltext,1,44),$did(11),1,44)85.        hsave -o hl hl.dou86.      }87.      did -r $dname 2,4,6,1188.      didtok $dname 2 44 $hget(hl,pseudo) 89.      didtok $dname 4 44 $hget(hl,salon) 90.    }91.  }92.}93.on *:text:*:*: {94.  if $istok($strip($1),$me,32) {95.    if $regex($hget(hl,pseudo),$nick) == 0 { 96.      if $regex($hget(hl,salon),$chan) == 0 {97.        window -kn @HightLight98.        if $target == $chan && $chan != $active  {99.          //echo -a $th $chr(2) $+($chr(3),%coul.hlpv) $(%phhlpv,2)100.          echo @HightLight $th [ $chan ]  $1- 101.          if ($var(%play.son)) .splay %son.cha 102.        }103.      }104.      if $target != $chan && $nick != $active {105.        //echo -a $th $chr(2) $+($chr(3),%coul.hlpv) $(%phhlps,2)106.        echo @HightLight $th [ PV ]  $1-107.        if ($var(%play.son)) .splay %son.pv108.      }109.    }110.  }111.}112.on *:input:*:{113.  if $1 == !hladd {114.    if $2 == chan { hadd -m hl salon $+($hget(hl,salon),$chr(44),$3) | hsave -o hl hl.dou | echo -a 4[HLADD]12 réussi pour $3 }115.    if $2 == nick { hadd -m hl pseudo $+($hget(hl,pseudo),$chr(44),$3) | hsave -o hl hl.dou | echo -a 4[HLADD]12 réussi pour $3 }116.    else { echo -a 4[ERREUR]12 Syntaxe incorrect : !hlsup   }117.  }118.  if $1 == !hlsup {119.    if $2 == chan { hadd -m hl salon $remtok($hget(hl,salon),$wildtok($hget(hl,salon),$3,1,44),1,44) | hsave -o hl hl.dou | echo -a 4[HLSUP]12 réussi pour $3 }120.    if $2 == nick { hadd -m hl pseudo $remtok($hget(hl,pseudo),$wildtok($hget(hl,pseudo),$3,1,44),1,44) | hsave -o hl hl.dou | echo -a 4[HLSUP]12 réussi pour $3 }121.    else { echo -a 4[ERREUR]12 Syntaxe incorrect : !hlsup   }122.  }123.}124.alias add.pse { hadd -m hl pseudo $+($hget(hl,pseudo),$chr(44),$1) }125.alias sup.pse { hadd -m hl pseudo $remtok($hget(hl,pseudo),$wildtok($hget(hl,pseudo),$1,1,44),1,44) }126.alias add.cha { hadd -m hl salon $+($hget(hl,salon),$chr(44),$1) }127.alias sup.cha { hadd -m hl salon $remtok($hget(hl,salon),$wildtok($hget(hl,salon),$1,1,44),1,44) }128.129.dialog phhl {130.  title "Phrases de HL"131.  size -1 -1 214 190132.  option dbu133.  box "HL Privé", 1, 109 4 98 118134.  edit %txthlpv, 2, 9 87 93 10, autohs center135.  box HL Salon, 4, 7 4 98 118136.  edit %txthlps, 6, 123 87 73 10, autohs center137.  combo 8, 9 24 45 50, size138.  combo 9, 57 24 45 50, size139.  text "Phrase de HL", 10, 20 77 73 8, center140.  text "Texte de décoration", 11, 123 77 73 8, center141.  combo 12, 111 24 45 50, size142.  combo 13, 159 24 45 50, size143.  text "Couleur de texte", 14, 9 14 44 8, center144.  text "Couleur de fond", 15, 57 14 45 8, center145.  text "Couleur de texte", 16, 111 14 44 8, center146.  text "Couleur de fond", 17, 159 14 45 8, center147.  box "Aide", 3, 7 123 200 50148.  check "Gras", 5, 43 99 50 10149.  check "Souligné", 7, 43 110 50 10150.  check "Gras", 18, 148 99 50 10151.  check "Souligné", 19, 148 110 50 10152.  text "1) Le mot $nick désigne la personne qui vous parle", 20, 11 132 186 8153.  text "2) Le mot $chan désigne le salon ou on vous parle", 21, 11 142 186 8154.  text "3) Le mot $server désigne le serveur ou on vous parle", 22, 11 152 186 8155.  text "4) Le mot $asctime([HH]) désigne l'heure à laquelle on vous a parlé", 23, 11 161 186 8156.  button "Fermer", 24, 84 175 37 12157.}158.159.160.on *:dialog:phhl:*:*:{161.  if $devent == init {162.    if %phhlpvgr { did -c $dname 5 }163.    if %phhlpvsou { did -c $dname 7 }164.    if %phhlpsgr { did -c $dname 18 }165.    if %phhlpssou { did -c $dname 19 }166.    didtok $dname 8,9,12,13 45 Blanc-Noir-Bleu Foncé-Vert Foncé-Rouge-Brun-Violet-Orange-Jaune-Vert Clair-Vert Anglais-Bleu Clair-Bleu Ciel-Rose-Gris Foncé-Gris Clair167.    did -c $dname 8 $calc($gettok(%coul.hlpv,1,44) + 1) | did -c $dname 9 $calc($gettok(%coul.hlpv,2,44) + 1)168.    did -c $dname 12 $calc($gettok(%coul.hlps,1,44) + 1) | did -c $dname 13 $calc($gettok(%coul.hlps,2,44) + 1)169.  }170.  if $devent == sclick {171.    if $did == 24 {172.      set %txthlpv $did(2)173.      set %txthlps $did(6)174.      set %coul.hlpv $iif($base($calc($did(9).sel - 1),10,10,2) != 00,$+($base($calc($did(8).sel - 1),10,10,2),$chr(44),$base($calc($did(9).sel - 1),10,10,2)),$base($calc($did(8).sel - 1),10,10,2))175.      set %coul.hlps $iif($base($calc($did(13).sel - 1),10,10,2) != 00,$+($base($calc($did(12).sel - 1),10,10,2),$chr(44),$base($calc($did(13).sel - 1),10,10,2)),$base($calc($did(12).sel - 1),10,10,2))176.      $iif($did(5).state,set,unset) %phhlpvgr $chr(2)177.      $iif($did(18).state,set,unset) %phhlpsgr $chr(2) 178.      $iif($did(7).state,set,unset) %phhlpvsou $chr(31)179.      $iif($did(19).state,set,unset) %phhlpssou $chr(31) 180.      set %phhlpv $+(%phhlpvgr,%phhlpvsou,%txthlpv)181.      set %phhlps $+(%phhlpsgr,%phhlpssou,%txthlps)182.      dialog -x phhl183.    } 184.  }185.}

Link to comment
Share on other sites



×
×
  • Create New...