Petit gestionaire de pseudo de chan et d'access en dialog

Soyez le premier à donner votre avis sur cette source.

Snippet vu 4 367 fois - Téléchargée 25 fois

Contenu du snippet

mon script permet de gerrer un peu ce qui se passe sur les autres serveur surtout si comme moi vou sen avez des tas ouvert et la on les vois pa tous juqu"en bas
g aussi mis une petite partie pour les amis ( hey ouais fo pa les oublier )
et une autre pour se connecter a un serveur (pa super utile je le reconais mais ca je l'ai fait pour le fun et parceque j'ai la fleme d'aller dans option et que j'ai pa touts les serveur en tete :)

pour le lancer: /msd
pour lancer l'auto ident: /nkopen
et pour les greet message /grtopen

Source / Exemple :


alias msd { 
  if (!$dialog(msgnameger).title) { dialog -m msgnameger msgnameger }
  else { dialog -v msgnameger }
}

dialog serverlist {
  title "Liste des Serveurs"
  size -1 -1 194 183
  option dbu
  box "", 2, 145 2 45 177
  button "Connecter", 4, 148 9 37 12
  button "Deconecter", 5, 148 22 37 12
  button "Fermer", 6, 149 164 37 12, cancel
  check "Open New", 7, 148 49 36 10
  list 1, 2 5 141 174, size
  button "Exporter", 3, 148 35 37 12
}

on *:dialog:serverlist:*:*:{
  if ($devent == init) {
    did -c $dname 7
    var %server $server(0)
    var %i 1
    while (%i <= %server) {
      did -a $dname 1 $server(%i)
      inc %i
    }
  }
  if ($devent == sclick) {
    if ($did == 3) {
      var %ou = $$sdir($mircdir,Ou voulez vous enregister la liste)
      var %lines = $did(1).lines
      var %i 1
      while (%i <= %lines) {
        write %ou $+ ServerList.txt $did(1,%i).text
        inc %i
      }
    }
    if ($did == 4) { 
      if ($did(7).state == 1) { server -m $did(1).seltext | halt }
      else { server  $did(1).seltext }
    }
    if ($did == 6) { dialog -x $dname }
  }
}
dialog friendslist {
  title "Amis"
  size -1 -1 205 160
  option dbu
  list 1, 3 4 90 153, size
  text "pseudo", 2, 95 5 64 8
  edit "", 3, 94 14 107 10, autohs
  text "Addresse ip", 4, 96 27 32 8
  edit "", 5, 95 36 106 10
  text "N° de telephone", 6, 97 72 41 8
  edit "", 7, 96 82 105 10, autohs
  text "Description", 8, 97 94 39 8
  edit "", 9, 96 103 105 10, autohs
  button "Moffier \ Ajouter", 10, 96 117 76 12
  button "Fermer", 11, 174 145 29 12, cancel
  button "Dcc Chat", 12, 96 131 37 12
  button "Dcc Send", 13, 135 131 37 12
  button "Ping", 14, 96 145 37 12
  button "Version", 15, 135 145 37 12
  text "Addresse eMail", 16, 96 48 39 8
  edit "", 17, 96 59 105 10, autohs
  button "Supprimer", 18, 174 117 29 12
  button "Vider", 19, 174 131 29 12
}

on *:dialog:friendslist:*:*:{
  if ($devent == init) {
    did -a $dname 3 $did(optionsupfornicnmanger,6)
    var %File = $scriptdir $+ FriendsList.ini
    var %line = $ini(%file,0)
    var %i 1
    while (%i <= %line) {
      did -a $dname 1 $ini(%file,%i)
      inc %i
    }
  }
  if ($devent == sclick) {
    if ($did == 19) { 
      did -r $dname 3 1
      did -r $dname 5 1
      did -r $dname 7 1
      did -r $dname 9 1
      did -r $dname 17 1
    }
    var %File = $scriptdir $+ FriendsList.ini
    if ($did == 18) {
      if ($?!="Etes Vous sur de vouloir supprimer ce profil ?" == $true) { 
        remini %file $did(1).seltext
        var %dname = $dname
        dialog -x %dname
        dialog -m %dname %dname
      }
    }
    if ($did == 1) {
      var %nick = $did(1).seltext
      did -o $dname 3 1 $iif($readini(%File,%nick,1), $ifmatch , N/a)
      did -o $dname 5 1 $iif($readini(%File,%nick,2), $ifmatch , N/a)
      did -o $dname 7 1 $iif($readini(%File,%nick,3), $ifmatch , N/a)
      did -o $dname 9 1 $iif($readini(%File,%nick,4), $ifmatch , N/a)
      did -o $dname 17 1 $iif($readini(%File,%nick,5), $ifmatch , N/a)
    }
    if ($did == 12) { 
      var %nick = $did(5)
      if (!%nick) { var %nick = $did(3) }
      dcc chat %nick 
    }
    if ($did == 13) {
      var %nick = $did(5)
      if (!%nick) { var %nick = $did(3) }
      dcc send %nick $$sfile($getdir) 
    }
    if ($did == 10) && ($did($dname,3)) {
      var %nick = $replace($did($dname,3),$chr(32),$chr(95))
      var %ip = $did($dname,5)
      var %mail = $did($dname,17)
      var %tel = $did($dname,7)
      var %desc = $did($dname,9)
      writeini %File %nick 1 %nick
      if (%ip) && (%i != N/a) { writeini %File %nick 2 %ip }
      else { remini %File %nick 2 }
      if (%tel) && (%tel != N/a) { writeini %File %nick 3 %tel }
      else { remini %File %nick 3 }
      if (%desc) && (%dec != N/a) { writeini %File %nick 4 %desc }
      else { remini %File %nick 4 }
      if (%mail) && (%mail != N/a) { writeini %File %nick 5 %mail }
      else { remini %File %nick 5 }

      var %dname = $dname
      dialog -x %dname
      dialog -m %dname %dname
    }
  }
}
dialog optionsupfornicnmanger {
  title "Autres"
  size -1 -1 226 183
  option dbu
  box "Ctcp", 2, 2 14 85 41
  button "Ping", 3, 6 24 37 12
  button "Version", 4, 45 24 37 12
  button "Autre", 5, 45 38 37 12
  edit "", 6, 2 3 85 10
  box "Moderation", 7, 2 56 85 54
  button "voicer", 8, 6 65 37 12
  button "DeVoicer", 9, 45 65 37 12
  button "Halfop", 10, 6 79 37 12
  button "DeHalfop", 11, 45 79 37 12
  button "Op", 12, 6 93 37 12
  button "DeOp", 13, 45 93 37 12
  box "Access", 14, 89 14 87 55
  edit "", 15, 89 3 87 10
  button "Voice", 16, 93 24 37 12
  button "Halfop", 17, 132 24 37 12
  button "Op", 18, 93 38 37 12
  button "Custom", 19, 132 38 37 12
  button "Aucain", 20, 93 52 37 12
  box "Sanction", 21, 89 126 87 54
  button "aKick", 22, 94 136 37 12
  button "Dakick", 23, 133 136 37 12
  button "Akick Stick", 24, 94 150 37 12
  button "DaKick Stick", 25, 133 150 37 12
  button "Akick Clear", 26, 94 164 37 12
  button "Help", 27, 133 164 37 12
  button "List", 28, 132 52 37 12
  box "NickServ", 29, 2 111 85 69
  button "Info", 30, 6 121 37 12
  button "Ghost", 31, 45 121 37 12
  button "Register", 32, 6 135 37 12
  button "Identify", 33, 45 135 37 12
  button "Drop", 34, 6 149 37 12
  button "Recorver", 35, 45 149 37 12
  button "Send pass", 36, 6 163 37 12
  button "Set Password", 37, 45 163 37 12
  box "Moderation Via Chanserv", 38, 89 70 87 55
  button "Voicer", 39, 93 80 37 12
  button "DeVoicer", 40, 132 80 37 12
  button "Halfop", 41, 93 94 37 12
  button "DeHalfop", 42, 132 94 37 12
  button "Op", 43, 93 108 37 12
  button "DeOp", 44, 132 108 37 12
  button "Xdcc List", 45, 6 38 37 12
  edit "", 1, 177 3 47 10
  box "Autres", 46, 178 15 46 165
  button "Server List", 47, 182 25 37 12
  button "Amis", 48, 182 39 37 12
  button "Fermer", 49, 182 165 37 12
  button "Sites Web", 50, 182 53 37 12
  button "Auto-ident", 51, 182 67 37 12
  button "Greet Manger", 52, 182 81 37 12
}

on *:dialog:optionsupfornicnmanger:*:*:{
  if ($devent == init) {
    did -a $dname 6 $did(msgnameger,11)
    did -a $dname 15 $did(msgnameger,1).seltext
    did -a $dname 1 $did(msgnameger,18).seltext
    did -b $dname 1
  }
  if ($devent == sclick) {
    scon $$hget(lnetwork,*SCON*)
    var %nick = $did($dname,6)
    var %chan = $did($dname,15)
    var %chanserv = !.msg chanserv
    var %nickserv = !.msg nickserv
    if ($did != 0) && ($did < 47) {
      if (!%chan) { did -a $dname 15 $$?="Entrez un chan" } 
      if (!%nick) { did -a $dname 6 $$?="Entrez un pseudo" } 
    }
    if ($did == 3) { ctcp %nick ping }
    if ($did == 4) { ctcp %nick Version }
    if ($did == 5) { ctcp %nick $$?="Enter CTCP" }
    if ($did == 8) { mode %chan +v %nick }
    if ($did == 9) { mode %chan -v %nick }
    if ($did == 10) { mode %chan +h %nick }
    if ($did == 11) { mode %chan -h %nick }
    if ($did == 12) { mode %chan +o %nick }
    if ($did == 13) { mode %chan -o %nick }
    if ($did == 16) { %chanserv access %chan add %nick 3 }
    if ($did == 17) { %chanserv access %chan add %nick 4 }
    if ($did == 18) { %chanserv access %chan add %nick 5 }
    if ($did == 19) { %chanserv access %chan add %nick $$?="Level des access" }
    if ($did == 20) { %chanserv access %chan del %nick }
    if ($did == 22) { %chanserv akick %chan add $address(%nick,2) $?="Motif du aKick" }
    if ($did == 23) { %chanserv akick %chan del $address(%nick,2) }
    if ($did == 24) { %chanserv AKICK %chan STICK $address(%nick,2) }
    if ($did == 25) { %chanserv AKICK %chan UNSTICK $address(%nick,2) }
    if ($did == 26) { %chanserv AKICK %chan Clear }
    if ($did == 27) { %chanserv help akick }
    if ($did == 28) { %chanserv access %chan list }
    if ($did == 30) { %nickserv info %nick all }
    if ($did == 31) { %nickserv GHOST %nick $$?="Mot de passe" }
    if ($did == 32) { %nickserv register $$?="Votre Mot de passe" $$?="Addresse eMail Valide" }
    if ($did == 33) { %nickserv identify $$?="Entrez Votre mot de passe" }
    if ($did == 34) { %nickserv drop }
    if ($did == 35) { %nickserv %nick $$?="Votre mot de passe" }
    if ($did == 36) { %nickserv sendpass %nick }
    if ($did == 37) { %nickserv set PASSWORD $$?="Nouveau Mot de passe" }
    if ($did == 39) { %chanserv voice %chan %nick }
    if ($did == 40) { %chanserv devoice %chan %nick }
    if ($did == 41) { %chanserv halfop %chan %nick }
    if ($did == 42) { %chanserv dehalfop %chan %nick }
    if ($did == 43) { %chanserv op %chan %nick }
    if ($did == 44) { %chanserv deop %chan %nick }
    if ($did == 45) { ctcp %nick xdcc list }
    if ($did == 47) { dialog -m serverlist serverlist }
    if ($did == 48) { if (!$dialog(friendslist).title) { dialog -m friendslist friendslist } | else { dialog -v friendslist } }
    if ($did == 49) { dialog -x $dname }
    if ($did == 50) {  if (!$dialog(wbsiteouaibe).title) { dialog -m wbsiteouaibe wbsiteouaibe } | else { dialog -v wbsiteouaibe } }
    if ($did == 51) { nkopen }
    if ($did == 52) { grtopen }
  }
}
dialog wbsiteouaibe {
  title "Sites Web Du Navigateur Internet"
  size -1 -1 198 166
  option dbu
  list 1, 2 2 193 149, size
  button "Ajouter", 2, 2 152 37 12
  button "Exporter", 3, 41 152 37 12
  button "Fermer", 4, 158 152 37 12, cancel
  button "Importer", 5, 80 152 37 12
  button "Actualiser", 6, 119 152 37 12
}

on *:dialog:wbsiteouaibe:*:*:{
  if ($devent == init) { wbrefreshurl }
  if ($devent == dclick) && ($did == 1) { run $$did(1).seltext }
  if ($devent == sclick) {
    if ($did == 2) { 
      var %tmp $$?="Url A ajouter"
      if (%tmp) { write $scriptdir $+ serverlist.txt %tmp | wbrefreshurl }
    }
    if ($did == 6) { wbrefreshurl }
    if ($did == 3) {
      var %File = $$sdir($mircdir,Ou Voulez enregister la liste ?) $+ serverlist.txt
      var %lines = $did(1).lines
      var %i 1
      while (%i <= %lines) {
        write -c %File $did(1,%i)
        inc %i
      }
      echo -a Urls Sauvegardées dans:09 %File
    }
    if ($did == 5) {
      var %File = $sfile($getdir)
      if ($exists(%File)) {
        var %lines = $lines(%File)
        var %i 1
        while (%i <= %lines) {
          did -a $dname 1 $read(%file,n,%i)
          inc %i
        }
        var %File = $scriptdir $+ serverlist.txt
        var %lines = $did(1).lines
        var %i 1
        while (%i <= %lines) {
          write %File $did(1,%i)
          inc %i
        }
        wbrefreshurl
      }
    }
  }
}

alias -l wbrefreshurl {
  var %len = $did(1).lines
  var %i 1
  while (%i <= %len) {
    did -d $dname 1 1
    inc %i
  }
  if ($exists($scriptdir $+ serverlist.txt)) {
    var %File = $scriptdir $+ serverlist.txt
    var %lines = $lines(%File)
    var %i 1
    while (%i <= %lines) {
      did -a $dname 1 $read(%file,n,%i)
      inc %i
    }
  }
  var %url = $url(0)
  var %i 1
  while (%i <= %url) {
    var %tmp = $url(%i)
    if (%tmp) { did -a $dname 1 %tmp }
    inc %i
  }
}

dialog msgnameger {
  title "Windows manager"
  size -1 -1 310 206
  option dbu
  list 1, 3 14 72 188, size
  list 2, 116 4 191 187, size
  button "Mass close", 3, 77 4 37 12
  button "Query", 4, 77 18 37 12
  button "Close", 5, 77 189 37 12, cancel
  button "Reload", 6, 77 175 37 12
  button "Dcc Chat", 7, 77 46 37 12
  button "Dcc Send", 8, 77 60 37 12
  button "Fserv", 9, 77 74 37 12
  button "Notice", 10, 77 88 37 12
  edit "", 11, 116 192 191 10
  button "Whois", 12, 77 102 37 12
  button "Dns", 13, 77 116 37 12
  button "Kick", 14, 77 130 37 12
  button "kick-Ban", 15, 77 144 37 12
  button "Msg", 16, 77 32 37 12
  button "Autres", 17, 77 158 37 12
  list 18, 3 4 72 10, size
}

on *:dialog:msgnameger:*:*:{
  if ($devent == init) {
    var %net = $lnetwork
    var %i 1
    while (%i <= %net) {
      did -a $dname 18 $lnetwork(%i)
      inc %i
    }
  }
  if ($devent == dclick) {
    scon $$hget(lnetwork,*SCON*)
    if ($did == 1) { join $did(1).seltext }
    if ($did == 2) { query $did(11) }
  }
  if ($devent == sclick) {
    if ($did != 18) { scon $$hget(lnetwork,*SCON*) }
    if ($did == 17) {
      if (!$dialog(optionsupfornicnmanger).title) { dialog -m optionsupfornicnmanger optionsupfornicnmanger } 
      else { dialog -v optionsupfornicnmanger }
    }
    if ($did == 16) { 
      var %msg $$?="Entrez votre message" 
      var %nick $did(11)
      !.msg %nick %msg
      echo -a 04 $+ %msg a bien été envoyé a09 %nick
    }
    if ($did == 14) {
      var %chan = $did(1).seltext
      var %nick = $did(11)
      kick %chan %nick $?="Motif"
    }
    if ($did == 15) {
      var %chan = $did(1).seltext
      var %nick = $did(11)
      kick %chan %nick
      mode %chan +b $address(%nick)
      kick %chan %nick $?="Motif"
    }
    if ($did == 4) { Query $did(11) }
    if ($did == 10) { 
      var %nick = $$did(11)
      if (%nick) { var %msg = $$?="Entrez votre message" }
      if (%nick) && (%msg) { 
        notice %nick %msg 
        echo -a 09 $+ %msg Envoyé a04 %nick
      }
    }
    if ($did == 9) { fserve $$did(11) $$?="Envois Maxi (nombre)" $$sdir($getdir) }
    if ($did == 7) { dcc chat $$did(11) }
    if ($did == 8) { dcc send $$did(11) $$sfile($getdir) }
    if ($did == 12) { whois $$did(11) }
    if ($did == 3) { close -m }
    if ($did == 13) { 
      var %name = $did($dname,11)
      if (%name !ison $did(1).seltext) { %name n'est pas sur $did(1).seltext }
      dns %name
    }
    if ($did == 2) {
      if ($did(2).seltext) {
        did -o $dname 11 1 $remove($did(2).seltext,$chr(43),$chr(37),$chr(64))
      }
    }
    if ($did == 6) { 
      var %dname $dname 
      dialog -x %dname 
      dialog -m %dname %dname 
    }
    if ($did == 1) && ($did(1).seltext) { 
      var %i 1
      var %len $did(2).lines
      while (%i <= %len) {
        did -d $dname 2 1
        inc %i
      } 
      var %chan = $did(1).seltext
      var %i 1
      while (%i <= $nick(%chan,0)) {
        var %nick = $nick(%chan,%i)
        var %k 0
        if (%nick isop %chan) { did -a $dname 2 $chr(64) $+ $nick(%chan,%i) | inc %k }
        if (%nick ishop %chan) && (%k == 0) { did -a $dname 2 $chr(37) $+ $nick(%chan,%i) | inc %k }
        if (%nick isvoice %chan) && (%k == 0) { did -a $dname 2 $chr(43) $+ $nick(%chan,%i) | inc %k }
        else { if (%k == 0) { did -a $dname 2 $nick(%chan,%i) } }
        inc %i
      }
    }
    if ($did == 18) { wnrefrechchan }
  }
}

alias lnetwork {
  var %tmp = $1-
  if (%tmp == 0 || !%tmp) { return $scon(0) }
  else if ($1- isnum) {
    scon $1-
    hadd -m lnetwork $network $server $port $serverip
    return $network
  }
  else return Erreur dans la fonction lnetwork
}

alias -l wnrefrechchan {
  var %net = $lnetwork
  var %i 1
  var %k 0
  var %actserv = $did(18).seltext
  if (!%actserv) { var %actserv = $network }
  while (%i <= %net) && (%k == 0) {
    var %tmp $lnetwork(%i)
    if (%tmp == %actserv) { var %k 1 }
    inc %i
  }
  scon $scon($calc(%i - 1))
  hadd -m lnetwork *SCON* $scon($calc(%i - 1))
  var %lines = $did($dname,1).lines
  var %i 1
  while (%i <= %lines) {
    did -d $dname 1 1
    inc %i
  }
  var %chan = $chan(0)
  var %i 1
  while (%i <= %chan) {
    did -a $dname 1 $chan(%i)
    inc %i
  }
}

dialog nickidentmanager {
  title "Gestionaire de pseudo"
  size -1 -1 167 127
  option dbu
  list 1, 1 3 77 122, size
  text "Pseudo", 2, 81 4 20 8
  edit "", 3, 80 14 85 10
  text "Mot de passe", 4, 81 26 34 8
  edit "", 5, 80 35 85 10
  button "Valider / Ajouter", 7, 81 46 84 12
  box "Nickserv", 8, 81 72 84 53
  button "Identifier", 9, 85 81 37 12
  button "Enregistrer", 10, 85 95 37 12
  button "Effacer", 11, 85 109 37 12
  button "Grouper", 12, 124 95 37 12
  button "Fermer", 16, 124 109 37 12, cancel
  button "Ghoster", 17, 124 81 37 12
  button "Suprimer de la liste", 18, 81 59 84 12
}

on *:dialog:nickidentmanager:init:*:{
  nkrefresh
}

on *:dialog:nickidentmanager:sclick:*:{
  if ($did == 9) { !.msg nickserv identify $$did(5) }
  if ($did == 11) { 
    if ($?!="Etes vous sur de vouloir effacer votre pseudo" == $true) { !.msg nickserv identify drop }
  }
  if ($did == 12) { !.msg nickserv identify group $$did(3) $$?="Mot de passe du groupe" }
  if ($did == 17) { !.msg nickserv ghost $$did(3) $$did(5) }
  if ($did == 10) { !.msg nickserv register $$did(5) $$?="Entrez une addresse eMail VALIDE" }

  if ($did == 18) {
    if ($?!="Etes vous sur ?" == $true) { 
      hdel nicks $$did(3) 
      hsave -o nicks $mircdir $+ System\hashTables\Nicks.txt
      nkrefresh
      did -r $dname 3
      did -r $dname 5

    }
  }
  if ($did == 7) {
    var %nick = $replace($did(3),$chr(32),$chr(95))
    var %pass = $replace($did(5),$chr(32),$chr(95))
    if (%pass) && (%nick) { hadd -m nicks %nick %nick %pass }
    hsave -o nicks $mircdir $+ System\hashTables\Nicks.txt
    var %dname $dname
    dialog -x %dname
    dialog -m %dname %dname
  }
  if ($did == 1) {
    var %text = $did(1).seltext
    if (%text) {
      did -o $dname 3 1 %text
      did -o $dname 5 1 $gettok($hget(nicks,%text),2,32)
    }
  }
}

alias nkopen {
  if ($dialog(nickidentmanager).title) { dialog -v nickidentmanager nickidentmanager }
  else { dialog -m nickidentmanager nickidentmanager }
}

alias -l nkrefresh {
  var %line = $did(1).lines
  var %i 1
  while (%i <= %line) {
    did -d $dname 1 1
    inc %i
  }
  var %items = $hget(nicks,0).item
  var %i 1
  while (%i <= %items) {
    var %item = $hget(nicks,%i).item
    did -a $dname 1 $gettok($hget(nicks,%item),1,32)
    inc %i
  }
}

on *:load:{
  hmake nicks 20
  var %dir $mircdir $+ System\hashTables
  if (!$exists(%dir)) { mkdir %dir }
  var %file = %dir $+ Nicks.txt
  if ($exists(%file)) { hload nicks %File }
  if (%Debug == On) { echo -a Auto-identifieur de pseudo Chargé }
}

on 1:NICK:{
  if ($nick == $me) {
    var %pass = $gettok($hget(nicks,$newnick),2,32)
    if (%pass) { !.msg nickserv identify %pass }
  }
}
on *:connect:{
  var %nick = $gettok($hget(nicks,$me),1,32)
  if (%nick) {
    !.msg nickserv identify $gettok($hget(nicks,$me),2,32)
  }
}

alias grtopen {
  if ($dialog(greetmanger).title) { dialog -v greetmanger }
  else { dialog -m greetmanger greetmanger }
}

dialog greetmanger {
  title "Greet Nick Manager"
  size -1 -1 224 146
  option dbu
  list 1, 2 2 80 142, size
  text "Pseudo", 2, 85 3 37 8
  edit "", 3, 84 12 87 10, autohs
  text "Chans (metre # pour tous)", 4, 84 24 86 8
  edit "", 5, 84 33 87 10, autohs
  text "Greet Message", 8, 85 47 40 8
  edit "", 9, 83 58 138 86, multi
  box "", 10, 174 3 46 51
  button "Valider", 11, 178 10 37 12
  button "Suprimer", 12, 178 24 37 12
  button "Fermer", 14, 178 38 37 12, cancel
}

on *:dialog:greetmanger:init:*:{
  grtrefresh

}
on *:dialog:greetmanger:sclick:*:{
  if ($did == 12) {
    var %nick $did(1).seltext
    if (%nick) && ($?!="Etes vous sur de vouloir suprimer de greet message ?" == $true) {
      hdel greet %nick
      hsave -o nicks $mircdir $+ System\hashTables\greet.txt
      grtrefresh

    }
  }
  if ($did == 11) {
    var %nick = $replace($did(3),$chr(32),$chr(95))
    var %chan = $replace($did(5),$chr(32),$chr(44))
    var %nbgreet = $did(9).lines
    var %i 1
    while (%i <= %nbgreet) {
      var %greet = %greet $did(9,%i)
      inc %i
    }
    if (%nick) && (%chan) && (%greet) {
      hadd -m Greet %nick %nick %chan %greet
      hsave -o nicks $mircdir $+ System\hashTables\greet.txt
      grtrefresh
    }
  }
  if ($did == 1) {
    var %tmp = $hget(greet,$did(1).seltext)
    did -o $dname 3 1 $gettok(%tmp,1,32)
    did -o $dname 5 1 $gettok(%tmp,2,32)
    did -o $dname 9 1 $gettok(%tmp,3-,32)
  }
}

alias -l grtrefresh {
  did -r $dname 3
  did -r $dname 5
  did -r $dname 9
  var %line = $did(1).lines
  var %i 1
  while (%i <= %line) {
    did -ds $dname 1 1
    inc %i
  }
  var %len = $hget(greet,0).item
  var %i 1
  while (%i <= %len) {
    var %item = $hget(greet,%i).item
    did -a $dname 1 $gettok($hget(greet,%item),1,32)
    inc %i
  }
}

alias WBc {
  var %nick = $gettok($hget(greet,$nick),1,32)
  if (!%nick) { var %nick = $me }
  if ($1) && (%nick) { 
    if (c !isin $chan($chan).mode)) { return 9•12«09WB12 ( $+ %nick $+ 12) 09WB12»09• $1-  }
    else { return •«WB ( $+ %nick $+ ) WB»• $1- }

  }
}

on *:JOIN:#:{
  if ($nick) { var %nick = $nick }
  else { var %nick = $me }
  var %tmp = $hget(greet,%nick)
  var %nick = $gettok(%tmp,1,32)
  if (%nick) {
    var %chan = $gettok(%tmp,2,32)
    var %greet = $gettok(%tmp,3-,32)
    if (%chan isin $chan) { !msg $chan $wbc(%greet) }
  }
}

Conclusion :


si vous avez des idées d'amelioration je suis ouvert :)
Ps: si qqun connaisai la commande pour faire un truc comme //set active #chan ca m'aiderais baucoup :)

A voir également

Ajouter un commentaire Commentaires
Messages postés
16
Date d'inscription
samedi 13 novembre 2004
Statut
Membre
Dernière intervention
26 décembre 2004

bien sur je lutilise é cé tré utile si je pouvé avoir l'autorisation de la mettre dan mon prochain script :)
a++
Messages postés
264
Date d'inscription
lundi 19 mai 2003
Statut
Membre
Dernière intervention
7 juillet 2009

merci a toi :)
en esperan que ca t'ai plus et que ma source ai pu t'etre utile :)
Messages postés
16
Date d'inscription
samedi 13 novembre 2004
Statut
Membre
Dernière intervention
26 décembre 2004

bonjour
super ta source grace a toi jé copri comment faire des dialog :/ car ji ariver jamé donc jté mi un 10/10 ca le mériter bien :)
a++
Messages postés
264
Date d'inscription
lundi 19 mai 2003
Statut
Membre
Dernière intervention
7 juillet 2009

merci :) si cette source te plais, tu devrais jeter un coup d'oeil a mon projet que j'ai pour le moment: le WBS-Script , c'est en fait un addon qui comporte mes scripts les plus utils, tu poura le trouver sur cette addresse:

http://www.ircfr.com/code.aspx?ID=26889

il comporte aussis la partie plus haut :) voila et merci pour vos encouragements a tous
Messages postés
1052
Date d'inscription
samedi 10 juillet 2004
Statut
Membre
Dernière intervention
30 novembre 2009
2
super !!
en scripting j'y connai rien
mais super pratique :)
bvo
Afficher les 14 commentaires

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.