Accueil > > > AUTO JOIN MULTI-SERVEURS-NETWORKS
AUTO JOIN MULTI-SERVEURS-NETWORKS
Information sur la source
Description
Je sais qu'il existe sur cs des milliers d'auto-join cela dit j'en ai retrouvé un que j'avais fait il y a assez longtemps, qui etait assez complet et que je n'ai que legerement retouché j'attend vos commentaires edit: donc comme demaindé j'ai ajouté l'auto join par server
Source
-
- dialog aj {
- title "Auto Join"
- size -1 -1 176 148
- option dbu
- list 1, 6 9 91 129, size
- combo 2, 107 16 60 50, size drop
- button "add", 5, 107 32 25 12,
- button "del", 6, 142 32 25 12,
- box "Servers and Channels", 7, 102 6 70 95
- button "add channel", 8, 108 66 58 12, ok
- button "del channel", 10, 108 82 58 12,
- check "open dialog on connect", 11, 105 114 70 10,
- check "enable auto join", 14, 105 104 58 10,
- button "!", 15, 108 49 10 10, flat
- text "Quel serveur ?", 19, 123 51 50 10
- button "&Cancel", 16, 138 126 33 12,cancel
- button "&OK", 17, 102 126 33 12
- link "JOIN ALL", 18, 33 139 33 12
- }
-
-
- on *:dialog:aj:*:*:{
- if ($devent == init) {
- mdx SetMircVersion $version
- mdx MarkDialog $dname
- mdx SetBorderStyle 1 border
- mdx SetControlMDX $dname 1 ListView report single grid > dll/views.mdx
- did -i $dname 1 1 headerdims 60 80 60
- did -i $dname 1 1 headertext Channel $chr(9) Description $chr(9) Pass
- if (!%aj.state) { set %aj.state c } | if (!%aj.owin) { set %aj.owin c }
- if (!$server) { did -h $dname 18 }
- did - $+ %aj.state $dname 14 | did - $+ %aj.owin $dname 11 | did -b $dname 8,10
- boucle-s | boucle-c
- if ($did(2)) { did -e $dname 8,6 }
- }
- if ($devent == sclick) {
- if ($did == 1) {
- did -e $dname 10 | tokenize 32 $did(1).seltext | set %aj.sel.chan $remove($6, +)
- if (!%aj.sel.chan) { did -b $dname 10 }
- }
- else { did $+(-,$iif($server,v,h)) $dname 18 | did -b $dname 10 }
- if ($did == 2) {
- if ($did(2)) { did -e $dname 8,6 }
- if ($lines(ajoin\ $+ $did(2))) { boucle-c } | else { did -r $dname 1 }
- }
- if ($did == 5) { if ($input(Rentrer ici le nom du serveur ou du network ,iey,Ajout d'un network/serveur irc)) { did -cua $dname 2 $! | write $s($shortfn($mircdirajoin\ $+ $!)) | did -r $dname 1 | did -e $dname 8,6 } }
- if ($did == 6) {
- if ($did(2)) { if ($hget($did(2))) hfree $did(2)
- .remove $s($shortfn($mircdirajoin\ $+ $did(2))) | did -r $dname 2,1 | unset %aj.sel.chan | boucle-s | boucle-c }
- }
- if ($did == 8) {
- if ($input(Rentrez le channel à ajouter à la liste :,iye,Ajout d'un channel)) { var %channel = $iif($left($!,1) == $chr(35),$!,$chr(35) $+ $!) } | if (!%channel) halt
- if ($input(Description du channel :,iye,Ajout d'un channel)) { var %desc = $! } | else { var %desc = aucune }
- if ($input(Mot de passe du channel (laisser vide si aucun mot de passe) :,ipye,Ajout d'un channel)) { var %pas = * $+ $! }
- hadd -m $did(2) %channel %desc %pas | hsave -o $did(2) $s($shortfn($mircdirajoin\ $+ $did(2)))
- boucle-c | halt
- }
- if ($did == 10) { if (%aj.sel.chan) { hdel $did(2) %aj.sel.chan | hsave -o $did(2) $shortfn($mircdirajoin\ $+ $did(2)) | boucle-c } }
- if ($did == 15) { if ($input(Si vous ne connaissez pas le serveur sur lequel vous vous trouvez tapez //echo -a $chr(36) $+ server lorsque vous êtes connecté à celui-ci. $crlf Pour savoir le network tapez //echo -a $chr(36) $+ network lorsque vous êtes connecté. $iif($server != $null,$crlf $crlf Actuellement connecté à: $crlf Network : $network $crlf Serveur : $server), io,Aide)) { halt } }
- if ($did == 17) { set %aj.state $iif(!$did(14).state,u,c) | set %aj.owin $iif(!$did(11).state,u,c) | dialog -x $dname $dname }
- if ($did == 18) {
- if ($lines(ajoin\ $+ $network)) {
- if (!$hget($network)) hmake $network 1000 | hload $network $s($shortfn($mircdirajoin\ $+ $network))
- var %i = $hget($network,0).item
- while (%i) {
- tokenize 32 $hget($network,%i).data | join $hget($network,%i).item $iif($left($ [ $+ [ $0] ],1) == *,$remove($ [ $+ [ $0] ],*),) | dec %i }
- }
- elseif ($lines(ajoin\ $+ $server)) {
- if (!$hget($server)) hmake $server 1000 | hload $server $s($shortfn($mircdirajoin\ $+ $server))
- var %i = $hget($server,0).item
- while (%i) {
- tokenize 32 $hget($server,%i).data | join $hget($server,%i).item $iif($left($ [ $+ [ $0] ],1) == *,$remove($ [ $+ [ $0] ],*),) | dec %i }
- }
- }
- }
- }
-
- alias -l boucle-s {
- var %i 1, %total $findfile($mircdirajoin,*.*,0)
- if (%total == 0) { did -b $dname 8,10,6 | halt }
- while (%i <= %total) {
- var %t = $nopath($findfile($mircdirajoin,*.*,%i))
- did $iif($network == %t || $server == %t,-cua,-a) $dname 2 %t
- inc %i }
- }
-
- alias -l boucle-c {
- if ($did(2)) { if (!$hget($did(2))) { hmake $did(2) 1000 }
- hload $did(2) $s($shortfn($mircdirajoin\ $+ $did(2))) }
- did -r aj 1
- var %i = $hget($did(2),0).item
- while (%i) {
- tokenize 32 $hget($did(2),%i).data
- did -a aj 1 $tab($hget($did(2),%i).item,$iif($left($ [ $+ [ $0 ] ],1) != *,$1- [ $+ [ $0 ] ] ,$1- [ $+ [ $calc($0 - 1) ] ]), $iif($left($ [ $+ [ $0 ] ],1) == *,$pass($remove($ [ $+ [ $0 ] ],*) ,)))
- dec %i }
- }
-
- alias -l tab {
- if (!$1) return $chr(9) | var %t,%w = 1
- while ($($+($,%w),2)) { %t = $instok(%t,$($+($,%w),2),0,9) | inc %w }
- return %t
- }
-
- alias aj if (!$dialog(aj)) dialog -m aj aj
- alias -l pass { return $str(*,$len($1)) }
- alias -l mdx dll $shortfn($mircdirdll\mdx.dll) $1-
- alias -l s return $+(",$1-,")
-
- on *:load:{ if (!$exists($scriptdirajoin)) { mkdir ajoin } echo -a chargement du script ok }
- on *:unload:{
- if ($exists(ajoin)) {
- .echo -q $findfile(ajoin,*.*,0,remove $s($1-))
- rmdir ajoin
- }
- unset %aj.* | echo -a Script correctement déchargé
- }
- on *:connect:{
- if (%aj.state == c && $lines(ajoin\ $+ $network)) {
- if (!$hget($network)) { hmake $network 1000 | hload $network $s($shortfn(ajoin\ $+ $network)) }
- var %i = $hget($network,0).item
- while (%i) { tokenize 32 $hget($network,%i).data | join $hget($network,%i).item $iif($left($ [ $+ [ $0 ] ],1) == *,$remove($ [ $+ [ $0 ] ],*),) | dec %i }
- }
- elseif (%aj.state == c && $lines(ajoin\ $+ $server)) {
- if (!$hget($server)) { hmake $server 1000 | hload $server $s($shortfn(ajoin\ $+ $server)) }
- var %i = $hget($server,0).item
- while (%i) { tokenize 32 $hget($server,%i).data | join $hget($server,%i).item $iif($left($ [ $+ [ $0 ] ],1) == *,$remove($ [ $+ [ $0 ] ],*),) | dec %i }
- }
- if (%aj.owin == c) aj
- }
dialog aj {
title "Auto Join"
size -1 -1 176 148
option dbu
list 1, 6 9 91 129, size
combo 2, 107 16 60 50, size drop
button "add", 5, 107 32 25 12,
button "del", 6, 142 32 25 12,
box "Servers and Channels", 7, 102 6 70 95
button "add channel", 8, 108 66 58 12, ok
button "del channel", 10, 108 82 58 12,
check "open dialog on connect", 11, 105 114 70 10,
check "enable auto join", 14, 105 104 58 10,
button "!", 15, 108 49 10 10, flat
text "Quel serveur ?", 19, 123 51 50 10
button "&Cancel", 16, 138 126 33 12,cancel
button "&OK", 17, 102 126 33 12
link "JOIN ALL", 18, 33 139 33 12
}
on *:dialog:aj:*:*:{
if ($devent == init) {
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetBorderStyle 1 border
mdx SetControlMDX $dname 1 ListView report single grid > dll/views.mdx
did -i $dname 1 1 headerdims 60 80 60
did -i $dname 1 1 headertext Channel $chr(9) Description $chr(9) Pass
if (!%aj.state) { set %aj.state c } | if (!%aj.owin) { set %aj.owin c }
if (!$server) { did -h $dname 18 }
did - $+ %aj.state $dname 14 | did - $+ %aj.owin $dname 11 | did -b $dname 8,10
boucle-s | boucle-c
if ($did(2)) { did -e $dname 8,6 }
}
if ($devent == sclick) {
if ($did == 1) {
did -e $dname 10 | tokenize 32 $did(1).seltext | set %aj.sel.chan $remove($6, +)
if (!%aj.sel.chan) { did -b $dname 10 }
}
else { did $+(-,$iif($server,v,h)) $dname 18 | did -b $dname 10 }
if ($did == 2) {
if ($did(2)) { did -e $dname 8,6 }
if ($lines(ajoin\ $+ $did(2))) { boucle-c } | else { did -r $dname 1 }
}
if ($did == 5) { if ($input(Rentrer ici le nom du serveur ou du network ,iey,Ajout d'un network/serveur irc)) { did -cua $dname 2 $! | write $s($shortfn($mircdirajoin\ $+ $!)) | did -r $dname 1 | did -e $dname 8,6 } }
if ($did == 6) {
if ($did(2)) { if ($hget($did(2))) hfree $did(2)
.remove $s($shortfn($mircdirajoin\ $+ $did(2))) | did -r $dname 2,1 | unset %aj.sel.chan | boucle-s | boucle-c }
}
if ($did == 8) {
if ($input(Rentrez le channel à ajouter à la liste :,iye,Ajout d'un channel)) { var %channel = $iif($left($!,1) == $chr(35),$!,$chr(35) $+ $!) } | if (!%channel) halt
if ($input(Description du channel :,iye,Ajout d'un channel)) { var %desc = $! } | else { var %desc = aucune }
if ($input(Mot de passe du channel (laisser vide si aucun mot de passe) :,ipye,Ajout d'un channel)) { var %pas = * $+ $! }
hadd -m $did(2) %channel %desc %pas | hsave -o $did(2) $s($shortfn($mircdirajoin\ $+ $did(2)))
boucle-c | halt
}
if ($did == 10) { if (%aj.sel.chan) { hdel $did(2) %aj.sel.chan | hsave -o $did(2) $shortfn($mircdirajoin\ $+ $did(2)) | boucle-c } }
if ($did == 15) { if ($input(Si vous ne connaissez pas le serveur sur lequel vous vous trouvez tapez //echo -a $chr(36) $+ server lorsque vous êtes connecté à celui-ci. $crlf Pour savoir le network tapez //echo -a $chr(36) $+ network lorsque vous êtes connecté. $iif($server != $null,$crlf $crlf Actuellement connecté à: $crlf Network : $network $crlf Serveur : $server), io,Aide)) { halt } }
if ($did == 17) { set %aj.state $iif(!$did(14).state,u,c) | set %aj.owin $iif(!$did(11).state,u,c) | dialog -x $dname $dname }
if ($did == 18) {
if ($lines(ajoin\ $+ $network)) {
if (!$hget($network)) hmake $network 1000 | hload $network $s($shortfn($mircdirajoin\ $+ $network))
var %i = $hget($network,0).item
while (%i) {
tokenize 32 $hget($network,%i).data | join $hget($network,%i).item $iif($left($ [ $+ [ $0] ],1) == *,$remove($ [ $+ [ $0] ],*),) | dec %i }
}
elseif ($lines(ajoin\ $+ $server)) {
if (!$hget($server)) hmake $server 1000 | hload $server $s($shortfn($mircdirajoin\ $+ $server))
var %i = $hget($server,0).item
while (%i) {
tokenize 32 $hget($server,%i).data | join $hget($server,%i).item $iif($left($ [ $+ [ $0] ],1) == *,$remove($ [ $+ [ $0] ],*),) | dec %i }
}
}
}
}
alias -l boucle-s {
var %i 1, %total $findfile($mircdirajoin,*.*,0)
if (%total == 0) { did -b $dname 8,10,6 | halt }
while (%i <= %total) {
var %t = $nopath($findfile($mircdirajoin,*.*,%i))
did $iif($network == %t || $server == %t,-cua,-a) $dname 2 %t
inc %i }
}
alias -l boucle-c {
if ($did(2)) { if (!$hget($did(2))) { hmake $did(2) 1000 }
hload $did(2) $s($shortfn($mircdirajoin\ $+ $did(2))) }
did -r aj 1
var %i = $hget($did(2),0).item
while (%i) {
tokenize 32 $hget($did(2),%i).data
did -a aj 1 $tab($hget($did(2),%i).item,$iif($left($ [ $+ [ $0 ] ],1) != *,$1- [ $+ [ $0 ] ] ,$1- [ $+ [ $calc($0 - 1) ] ]), $iif($left($ [ $+ [ $0 ] ],1) == *,$pass($remove($ [ $+ [ $0 ] ],*) ,)))
dec %i }
}
alias -l tab {
if (!$1) return $chr(9) | var %t,%w = 1
while ($($+($,%w),2)) { %t = $instok(%t,$($+($,%w),2),0,9) | inc %w }
return %t
}
alias aj if (!$dialog(aj)) dialog -m aj aj
alias -l pass { return $str(*,$len($1)) }
alias -l mdx dll $shortfn($mircdirdll\mdx.dll) $1-
alias -l s return $+(",$1-,")
on *:load:{ if (!$exists($scriptdirajoin)) { mkdir ajoin } echo -a chargement du script ok }
on *:unload:{
if ($exists(ajoin)) {
.echo -q $findfile(ajoin,*.*,0,remove $s($1-))
rmdir ajoin
}
unset %aj.* | echo -a Script correctement déchargé
}
on *:connect:{
if (%aj.state == c && $lines(ajoin\ $+ $network)) {
if (!$hget($network)) { hmake $network 1000 | hload $network $s($shortfn(ajoin\ $+ $network)) }
var %i = $hget($network,0).item
while (%i) { tokenize 32 $hget($network,%i).data | join $hget($network,%i).item $iif($left($ [ $+ [ $0 ] ],1) == *,$remove($ [ $+ [ $0 ] ],*),) | dec %i }
}
elseif (%aj.state == c && $lines(ajoin\ $+ $server)) {
if (!$hget($server)) { hmake $server 1000 | hload $server $s($shortfn(ajoin\ $+ $server)) }
var %i = $hget($server,0).item
while (%i) { tokenize 32 $hget($server,%i).data | join $hget($server,%i).item $iif($left($ [ $+ [ $0 ] ],1) == *,$remove($ [ $+ [ $0 ] ],*),) | dec %i }
}
if (%aj.owin == c) aj
}
Conclusion
il vous faut placer mdx.dll et views.mdx dans un dossier dll ds la racine de votre script important: signaler moi tous les bugs que vs pouvez trouver merci
utilisation: /aj
Historique
- 28 mai 2005 12:49:11 :
- supporte desormais server et network
(dites moi si vous soyez des bugs)
- 01 juin 2005 21:05:26 :
- probleme des paths a espaces reglé
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Arnault Nouvel et Antoine Dongois Le processus à prendre : Apprendre (découvrir la plateforme) Préparer (documenter l'historique et choisir la méthode de MAJ) Test (Test de MAJ) Implémenter (Effectuer la MAJ) Valid...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOURTECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOUR par ROMELARD Fabrice
Après un retour sur l'histoire des TechDays de Paris et le fait que ce soit le plus gros event MS au monde (du fait de sa gratuité), le président de MS France (Eric Boustoullier) a fait une présentation de la vision Microsoft pour les années à venir...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice CRéATION D'UNE BASE DE DONNéE SOUS SQL AZURECRéATION D'UNE BASE DE DONNéE SOUS SQL AZURE par junarnoalg
Sans rentrer dans les détails, je me propose ici de faire un rapide tour de ce que propose SQL Azure.
SQL Azure est avant tout un service d'hébergement de base de données relationnelles construit sur SQL Server. Il permet aux entreprises d...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
RE : ON RAWMODERE : ON RAWMODE par WorldDMT
Cliquez pour lire la suite par WorldDMT AVERTISSMENT ET KIKKAVERTISSMENT ET KIKK par mouhcine951990
Cliquez pour lire la suite par mouhcine951990
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|