AUTOJOIN AVEC AUTO-MESSAGE 20 SALONS

cs_ReMi34 Messages postés 1025 Date d'inscription vendredi 29 août 2003 Statut Membre Dernière intervention 28 mars 2005 - 28 juin 2004 à 09:22
cs_tofu Messages postés 1726 Date d'inscription vendredi 12 septembre 2003 Statut Membre Dernière intervention 13 juin 2009 - 29 juin 2004 à 20:18
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/24076-autojoin-avec-auto-message-20-salons

cs_tofu Messages postés 1726 Date d'inscription vendredi 12 septembre 2003 Statut Membre Dernière intervention 13 juin 2009 1
29 juin 2004 à 20:18
" Je te met un ptit 10 histoire de remonter ta note ;p" et ba moi je mets 1/10 pour la faire baisser emotion.
- pas de liste
- pas multiserveur
- pas de +k
- design moche
- pourquoi un .ini et pas .mrc ?
- mal/pas optimisé
- variables globales et trop nombreuses (40 var pr un ajoin... LOL)
- events du dialog pas regroupés
- le timer qui fait défiler le titre ça sert à queudalle
-1 par ligne ci dessus. 10-9 lignes, 1/10 :)
NaNo45 Messages postés 81 Date d'inscription mercredi 2 juillet 2003 Statut Membre Dernière intervention 29 juin 2004
29 juin 2004 à 15:35
Je Trouve sa pas Super, Il est pas configurable en plus...
Avec un List sa Ferai mieu ( ilimiter... )
cs_Huitre Messages postés 290 Date d'inscription mardi 21 janvier 2003 Statut Membre Dernière intervention 29 février 2008
28 juin 2004 à 20:35
Owned by dj328i :)
HuRriCaM3 Messages postés 14 Date d'inscription mardi 11 mai 2004 Statut Membre Dernière intervention 11 mars 2005
28 juin 2004 à 19:32
beh oké merci DiGhan :) . c'est ma 1ere source Dialog ici deja et merci de ton conseil dj328i la prochaine fois beh sa sert a rien :/
..Breff.. bye...
Bloock Messages postés 74 Date d'inscription mercredi 21 janvier 2004 Statut Membre Dernière intervention 9 avril 2005
28 juin 2004 à 19:32
Dighan, oui, c'est plutôt avec des remarques comme les précédentes qu'on évolue car :
• Y z'ont corrigé le code.
• Si on te dit que ta source est nul, c'est un peu comme si on te lance un défi, t'as envie de faire un truc 'révolutionnaire'.
• Y z'ont dit des trucs pour qu'il fasse un version 2 de son add-on ( exemple : fait une listview ; mets le mode +k ).

Sinon, euh, ton dialog, il est trop gros. Mets le multiserver, le mode +k. Mets aussi un combo plutôt que de mettre plein d'edit.
DiGhan Messages postés 239 Date d'inscription samedi 21 février 2004 Statut Membre Dernière intervention 3 juin 2010 1
28 juin 2004 à 18:00
C'est possible que le Mr débute ! C'est avec des grosses remarques, comme les précédentes qu'on évolue.
Bon courage et baisse pas les bras !
dj328i Messages postés 312 Date d'inscription dimanche 23 février 2003 Statut Membre Dernière intervention 14 mars 2022
28 juin 2004 à 18:00
Correction , parce que j'ai peut être fait ca un peu vite

on 1:dialog:autojoin:init:*:{
%x 100 | %y 1
while (%x <= 1200 && %y <= $len(By HuRriCam3)) {
.timer -m 1 %x did -ra autojoin 100 $left(By HuRriCam3,%y)
inc %x 100 , inc %y } | unset %x , %y }

---

On *:JOIN:#:{
if ($nick == $me) {
%infodid = $addtok(6 19 20 21 23 24 25 26 63 42 98 96 94 92 90 88 86 84 82 80 98 76 74 72 70 68 66 64 61 59 57 55 53 51 49 47 45 43 102,103,32)
%x 1 | %y 1
while (%x <= 20 || %y <= 20) {
msg $+($iif(%x <= 20,%chan,%msgsalon),$iif(%x <= 20,%x,%y)
$did(autojoin,$gettok(%infodid,%x,32)).text
if (%x <= 20) { inc %x }
else { inc %y } } | unset %x , %y , %info.did } }
dj328i Messages postés 312 Date d'inscription dimanche 23 février 2003 Statut Membre Dernière intervention 14 mars 2022
28 juin 2004 à 16:34
Sérieusement , je sais pas ou ta apprie a scripter , mais met toi au boucle ou arrête carrément de coder ... lol

-----

On *:JOIN:#:{
if ($nick == $me) {
if ($chan == %chan1) { msg %chan1 %msgsalon1 }
if ($chan == %chan2) { msg %chan2 %msgsalon2 }
if ($chan == %chan3) { msg %chan3 %msgsalon3 }
if ($chan == %chan4) { msg %chan4 %msgsalon4 }
if ($chan == %chan5) { msg %chan5 %msgsalon5 }
if ($chan == %chan6) { msg %chan6 %msgsalon6 }
if ($chan == %chan7) { msg %chan7 %msgsalon7 }
if ($chan == %chan8) { msg %chan8 %msgsalon8 }
if ($chan == %chan9) { msg %chan9 %msgsalon9 }
if ($chan == %chan10) { msg %chan10 %msgsalon10 }
if ($chan == %chan11) { msg %chan11 %msgsalon11 }
if ($chan == %chan12) { msg %chan12 %msgsalon12 }
if ($chan == %chan13) { msg %chan13 %msgsalon13 }
if ($chan == %chan14) { msg %chan14 %msgsalon14 }
if ($chan == %chan15) { msg %chan15 %msgsalon15 }
if ($chan == %chan16) { msg %chan16 %msgsalon16 }
if ($chan == %chan17) { msg %chan17 %msgsalon17 }
if ($chan == %chan18) { msg %chan18 %msgsalon18 }
if ($chan == %chan19) { msg %chan19 %msgsalon19 }
if ($chan == %chan20) { msg %chan20 %msgsalon20 }
}

Devient :

On *:JOIN:#:{
if ($nick == $me) {
%x = 1
while (%x <= 20) {
if ($chan == $+(%chan,%x)) { msg $+(%chan,%x) $+(%msgsalon,%x) }
inc %x } | unset %x } }

----

On 1:Dialog:autojoin:sclick:*: {
if ($did == 1) {
set %chan1 $did(autojoin,6).text
set %chan2 $did(autojoin,19).text
set %chan3 $did(autojoin,20).text
set %chan4 $did(autojoin,21).text
set %chan5 $did(autojoin,23).text
set %chan6 $did(autojoin,24).text
set %chan7 $did(autojoin,25).text
set %chan8 $did(autojoin,26).text
set %chan9 $did(autojoin,63).text
set %chan10 $did(autojoin,42).text
set %chan11 $did(autojoin,98).text
set %chan12 $did(autojoin,96).text
set %chan13 $did(autojoin,94).text
set %chan14 $did(autojoin,92).text
set %chan15 $did(autojoin,90).text
set %chan16 $did(autojoin,88).text
set %chan17 $did(autojoin,86).text
set %chan18 $did(autojoin,84).text
set %chan19 $did(autojoin,82).text
set %chan20 $did(autojoin,80).text
set %msgsalon1 $did(autojoin,78).text
set %msgsalon2 $did(autojoin,76).text
set %msgsalon3 $did(autojoin,74).text
set %msgsalon4 $did(autojoin,72).text
set %msgsalon5 $did(autojoin,70).text
set %msgsalon6 $did(autojoin,68).text
set %msgsalon7 $did(autojoin,66).text
set %msgsalon8 $did(autojoin,64).text
set %msgsalon9 $did(autojoin,61).text
set %msgsalon10 $did(autojoin,59).text
set %msgsalon11 $did(autojoin,57).text
set %msgsalon12 $did(autojoin,55).text
set %msgsalon13 $did(autojoin,53).text
set %msgsalon14 $did(autojoin,51).text
set %msgsalon15 $did(autojoin,49).text
set %msgsalon16 $did(autojoin,47).text
set %msgsalon17 $did(autojoin,45).text
set %msgsalon18 $did(autojoin,43).text
set %msgsalon19 $did(autojoin,102).text
set %msgsalon20 $did(autojoin,103).text
}

Devient :

On *:JOIN:#:{
if ($nick == $me) {
%infodid = $addtok(6 19 20 21 23 24 25 26 63 42 98 96 94 92 90 88 86 84 82 80 98 76 74 72 70 68 66 64 61 59 57 55 53 51 49 47 45 43 102,103,32)
%x 1 | %y 1
while (%x <= 40) {
msg $+($iif(%x <= 20,%chan,%msgsalon),$iif(%x <= 20,%x,%y)
$did(autojoin,$gettok(%infodid,%x,32)).text
if (%x <= 20) { inc %x }
else { inc %y } } | unset %x , %y , %info.did } }

---------

On 1:CONNECT:{
if (%chan1 != $null) { join %chan1 }
if (%chan2 != $null) { join %chan2 }
if (%chan3 != $null) { join %chan3 }
if (%chan4 != $null) { join %chan4 }
if (%chan5 != $null) { join %chan5 }
if (%chan6 != $null) { join %chan6 }
if (%chan7 != $null) { join %chan7 }
if (%chan8 != $null) { join %chan8 }
if (%chan9 != $null) { join %chan9 }
if (%chan10 != $null) { join %chan10 }
if (%chan11 != $null) { join %chan11 }
if (%chan12 != $null) { join %chan12 }
if (%chan13 != $null) { join %chan13 }
if (%chan14 != $null) { join %chan14 }
if (%chan15 != $null) { join %chan15 }
if (%chan16 != $null) { join %chan16 }
if (%chan17 != $null) { join %chan17 }
if (%chan18 != $null) { join %chan18 }
if (%chan19 != $null) { join %chan19 }
if (%chan20 != $null) { join %chan20 }
}

devient :

On 1:CONNECT:{
%x = 1
while (%x <= 20) {
if ($+(%chan,%x)) { join $+(%chan,%x) }
inc %x } | unset %x }


------

on 1:dialog:autojoin:init:*:{
.timer -m 1 100 did -ra autojoin 100 B
n.timer -m 1 200 did -ra autojoin 100 By
.timer -m 1 300 did -ra autojoin 100 By H
.timer -m 1 400 did -ra autojoin 100 By Hu
.timer -m 1 500 did -ra autojoin 100 By HuR
.timer -m 1 600 did -ra autojoin 100 By HuRr
.timer -m 1 700 did -ra autojoin 100 By HuRri
.timer -m 1 800 did -ra autojoin 100 By HuRriC
.timer -m 1 900 did -ra autojoin 100 By HuRriCa
.timer -m 1 1000 did -ra autojoin 100 By HuRriCam
.timer -m 1 1100 did -ra autojoin 100 By HuRriCam3
.timer -m 1 1200 did -ra autojoin 100 By HuRriCam3 :)

Devient :

on 1:dialog:autojoin:init:*:{
%x 100 | %y 1
%while (%x <= 1200 && %y <= $len(%text)) {
.timer -m 1 %x did -ra autojoin 100 $left(By HuRriCam3,%y)
inc %x 100 , inc %y } | unset %x , %y }

Et ainsi de suite pour le text

----

Tout ca , ca as pas été tester , mais ca devrais pas trop causer de problème.

Prend exemple sur c'est boucles pour tes prochains script , ou sinon je te le dit tout de suite , ne poste pas d'autre source lol

J'espère que ca auras su t'aider un peu.
Kerrigan Messages postés 708 Date d'inscription lundi 15 juillet 2002 Statut Membre Dernière intervention 17 mars 2005
28 juin 2004 à 15:55
toutes les sources de ce types, limitées et mal codées, n'ont pas bien été acueuilli. consulte les sources du site avant de poster
cs_emotion Messages postés 12 Date d'inscription vendredi 25 juillet 2003 Statut Membre Dernière intervention 28 juin 2004
28 juin 2004 à 14:57
Je te met un ptit 10 histoire de remonter ta note ;p
Sinon c'est vrai qu'un illimité serait pas de trop, tu met une tite boucle
Et les salons dans un fichier.txt, si tu veux de l'aide tu sais ou me trouver ;)
Evrae Messages postés 58 Date d'inscription mardi 9 décembre 2003 Statut Membre Dernière intervention 16 avril 2005
28 juin 2004 à 14:34
g le droit de rire? :p mal optimisé, limité, incomplet (pas de prise de mode +k...) et moche graphiquement...
talking Messages postés 343 Date d'inscription dimanche 30 novembre 2003 Statut Membre Dernière intervention 19 août 2006 1
28 juin 2004 à 11:49
Un listview n'aurait pas était plus mal avec comme collone le chan le serveur et éventuellement la key
cs_SornDrixer Messages postés 2084 Date d'inscription jeudi 12 décembre 2002 Statut Membre Dernière intervention 30 janvier 2011 8
28 juin 2004 à 10:01
Ca me fait rire ces addons qui limitent le nombre d'entrée ...
Non seulement ton addon ne gère pas un nombre illimité mais de salons, mais en +, il n'est pas multiserveur, et ne gère pas le +k sur les canaux.
cs_ReMi34 Messages postés 1025 Date d'inscription vendredi 29 août 2003 Statut Membre Dernière intervention 28 mars 2005 2
28 juin 2004 à 09:22
Rho, pourquoi ne pas le faire illimité ?
Rejoignez-nous