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 2012 : SESSION PLEINIèRE JOUR 3TECHDAYS PARIS 2012 : SESSION PLEINIèRE JOUR 3 par ROMELARD Fabrice
Speaker: Bernard Ourghanlian Cette session est comme chaque jour transmise en live par BrainSonic, et j'ai donc suivi cette troisième pleinière par ce moyen sur mon iPad . Elle est dédiée comme chaque année à la mise en perspective de l'é...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE !MISHRA READER : UN LECTEUR RSS TRèS ZUNE STYLE EN OPEN SOURCE ! par Vko
Hier durant une session dédiée aux Techdays 2012, j'ai eu le plaisir d'annoncer la sortie de la Béta 2 de Mishra Reader. C'est quoi ? Pour les utilisateurs, c'est une vraie expérience de lecture de flux RSS sur Windows. Rien à voir avec les produit...
Cliquez pour lire la suite de l'article par Vko [FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : AIDERE : AIDE par Nico26000
Cliquez pour lire la suite par Nico26000 RE : AIDERE : AIDE par WorldDMT
Cliquez pour lire la suite par WorldDMT AIDEAIDE par Nico26000
Cliquez pour lire la suite par Nico26000
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|