Auto join

Contenu du snippet

Bon comme le précédent rajoutez une icone et une dll ( mdx ) parce que bon c'est bien gentil mais je vais pas tout vous faire lol donc c'est un auto join tout bete testez pis dites moi :)

Source / Exemple :


dialog autojoin {
  title "Auto Join - XerBo"
  size -1 -1 131 125
  option dbu
  icon $mircdirSysteme\Graphiques\ajoin.ico, 0
  combo 1, 9 6 117 44, size drop
  button "Ajouter un serveur", 2, 15 21 50 9, flat
  button "Retirer ce serveur", 3, 67 21 49 9, flat
  box "", 4, 4 -1 126 35
  box "", 5, 4 34 126 80
  button "ø Fermer ø", 6, 98 115 32 9, ok
  list 7, 7 40 72 71, size
  button "Ajouter", 8, 87 58 37 10
  box "Ajouter", 9, 82 38 46 34
  edit "", 10, 87 47 36 10, autohs
  box "Supprimer", 11, 82 73 46 23
  button "Enlever", 13, 87 82 37 9
}

alias massjoin {
  var %temp = 0
  var %temp2 = 0
  :boucle
  inc %temp
  if ( %temp > 20 ) { return }
  if ( $readini(systeme\ajoin.ini, %temp , nom) = %u-aj-tempo ) { goto suite }
  goto boucle
  :suite
  inc %temp2
  if ( %temp2 > $readini(systeme\ajoin.ini, %temp , total) ) { return }
  if ( $readini(systeme\ajoin.ini, %temp , %temp2 ) != $null ) { join $readini(systeme\ajoin.ini, %temp , %temp2 ) }
  goto suite
}
on 1:dialog:autojoin:sclick:3:{
  if ( $did(1).sel = $null ) { return }
  if ( $input(Es tu sur de vouloir effacer ce serveur et toute sa configuration ?,yq,ATTENTION) = $true ) {
    var %temp =  $did(1).sel
    remini systeme\ajoin.ini %temp
    writeini systeme\ajoin.ini autojoin nbrserv $calc( $readini(systeme\ajoin.ini, autojoin , nbrserv) - 1)
    majaj1
  }
}
on 1:dialog:autojoin:sclick:2:{
  var %temp $?="Adresse du serveur ? ( Exemple : irc.voila.fr ) ou ecris : &actif pour que le serveur actif soit utilisé comme nom"
  if ( %temp = &actif ) { %temp = %u-aj-tempo }
  var %loop = 0
  :boucle
  inc %loop
  if ( %loop > 50 ) { return }
  if ( $readini(systeme\ajoin.ini, %loop , nom) = $null ) { writeini systeme\ajoin.ini %loop nom %temp | majaj1 | return }
  goto boucle
}
on 1:dialog:autojoin:sclick:13:{
  if ( $did(1).sel = $null ) { return }
  var %temp =  $did(1).sel
  var %temp2 = $did(7).sel
  remini systeme\ajoin.ini %temp %temp2
  writeini systeme\ajoin.ini %temp total $calc( $readini(systeme\ajoin.ini, %temp , total) - 1)
  majaj2
}
on 1:dialog:autojoin:sclick:8:{
  if ( $did(1).sel = $null ) { return }
  var %temp = $did(1).sel
  var %temp2 = $did(10)
  var %loop = 0
  writeini systeme\ajoin.ini %temp total $calc( $readini(systeme\ajoin.ini, %temp , total) + 1)
  :loop
  inc %loop
  if ( %loop > $readini(systeme\ajoin.ini, %temp , total) ) { return }
  if ( $readini(systeme\ajoin.ini, %temp , %loop ) = $null ) { writeini systeme\ajoin.ini %temp %loop %temp2 | majaj2 | return }
  goto loop
}
on 1:dialog:autojoin:sclick:1:{
  majaj2
}
alias majaj2 {
  var %nbr = $did(1).sel
  var %temp = 0
  did -r autojoin 7
  :boucle
  inc %temp
  if ( %temp > 50 ) { return }
  if ( $readini(systeme\ajoin.ini, %nbr , %temp ) != $null ) { did -a autojoin 7 $readini(systeme\ajoin.ini, %nbr , %temp ) | goto boucle }
  goto boucle
}
alias majaj1 {
  var %temp = $readini(systeme\ajoin.ini, autojoin, nbrserv)
  did -r autojoin 1
  var %temp2 = 0
  :boucle
  inc %temp2
  if ( %temp2 > 50 ) { return }
  if ( $readini(systeme\ajoin.ini, %temp2 , nom) != $null ) { did -a autojoin 1 $readini(systeme\ajoin.ini, %temp2 , nom) | goto boucle }
  if ( $readini(systeme\ajoin.ini, %temp2 , nom) = $null ) { goto boucle }
}
on 1:dialog:autojoin:init:*:{
  mark $dname
  majaj1
}
dialog chargaj {
  size -1 -1 300 100
  title Chargement...
  button "OK" ,1, 800 800 800 800,ok
  text "Auto join en cours..." ,2, 20 5 280 20
  text "Auto join en cours..." ,3, 20 35 260 20
  button "Fermer" ,4, 20 65 260 30, disable
}
ON 1:dialog:chargaj:sclick:4:{ dx chargaj }
ON 1:dialog:chargaj:init:*:{
  if ( $dll(systeme\DEMID.dll,SetTopic, chargaj) = /s_ok ) { halt }
  dll systeme\mdx.dll SetMircVersion $version 
  dll systeme\mdx.dll MarkDialog $dname
  dll systeme\mdx.dll SetControlMDX 3 ProgressBar smooth > systeme\ctl_gen.mdx
  did -i $dname 3 1 barcolor $rgb(255,0,0)
  did -i $dname 3 1 bgcolor $rgb(80,1,1)
}

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.