Jump to content

Archived

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

coders-irc_Bot

Auto connexion

Recommended Posts

  • Administrators

Bonjours, ceci est un auto connexion plus exactement, vous ajoutez vos serveurs et vous les joindrez automatiquement à l'ouverture de mIRC.
Pour ouvrir le dialog, tapez : /AutoC

alias autoc dialog -m ac ac

dialog ac {
  title "Auto Connexion"
  size -1 -1 170 261
  button "Enregistrer", 1, 7 210 155 24, ok
  box "Option / Entrer un serveur", 2, 2 120 166 138
  list 3, 8 17 155 100
  edit "", 4, 8 135 154 22, autohs
  button "&Ajouter", 5, 7 160 74 24, disable
  button "&Modifier", 6, 87 160 74 24, disable
  button "&Supprimer", 7, 7 185 74 24, disable
  button "&Joindre tout", 8, 87 185 74 24
  check "Activer / Désactiver", 10, 9 235 120 21
  box "Servers", 11, 2 2 166 117
}
on *:dialog:ac:*:*:{
  if ($devent == init) {
    if ($group(#ac) == on) { did -c $dname 10 }
    ;if ($group(#ac) == off) { did -u $dname 10 }
    if (!$lines(AServ.txt)) { did -b $dname 8 }
    var %a $lines(AServ.txt), %b 1
    while (%a >= %b) {
      did -a $dname 3 $read(ac.txt,%b)
      inc %b
    }
  }
  if ($devent == sclick) {
    if ($did == 5) {
      write ac.txt $did(4)
      did -a $dname 3 $did(4)
      did -r $dname 4
      if ($did(8).enabled == $false) { did -e $dname 8 }
    }
    if ($did(3).sel) { did -e $dname 6,7 }
    if ($did == 6) {
      var %a $?="Par quel serveur remplacer $did(3).seltext ?"
      if (!%a) { halt }
      write $+(-l,$did(3).sel) ac.txt %a
      did -d $dname 3 $did(3).sel
      did -a $dname 3 %a
    }
    if ($did == 7) { write $+(-dl,$did(3).sel) ac.txt | did -d $dname 3 $did(3).sel | if (!$lines(ac.txt)) { did -b $dname 6,7,8 } }
    if ($did == 8) { ac }
    if ($did == 10) {
      if ($did(10).state == 1) { .enable #ac }
      else { .disable #ac }
    }
  }
  if ($devent == edit) {
    if ($did == 4) && (??* iswm $did(4)) { did -e $dname 5 }
    else { did -b $dname 5 }
  }
}
alias ac {
  var %a $lines(ac.txt), %b 2
  server $read(ac.txt,1)
  while (%a >= %b) {
    server -m $read(ac.txt,%b)
    inc %b
  }
}
#ac off
on *:start:{ ac }
#ac end

 

Link to comment
Share on other sites



×
×
  • Create New...