|
Trouver une ressource
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
AUTO JOIN MULTI SERVEUR EN HASH TABLE
Information sur la source
Description
Voila tout est dit dans le titre c'est un auto join ou l'on peut entrer un nombre infinis de salon (selon la limite imposer par le server) sur un nombre infinis de server et tous ça en hash table. j'attend vos commentaire pour le faire évoluer et pour recenser les bug que je n'aurais pas vu (normalement il n'y en as pas )
Source
- dialog ajoin {
- title "Auto - join"
- size -1 -1 247 238
- option pixels
- text "Entrer un Salon à joindre", 1, 6 4 235 16
- edit "", 2, 6 27 235 20
- text "Entre un server (ex : Voila , EpiKnet , ...)", 3, 6 53 235 16
- edit "", 4, 6 75 235 21
- button "Ajouter", 5, 6 103 116 25
- button "Effacer", 6, 125 103 116 25
- button "Effacer tout les autojoins d'un server", 7, 5 131 235 25
- button "Liste server spécifier", 8, 6 160 116 25
- button "Tout effacer", 9, 125 160 116 25
- button "Liste server et Salon complète.", 10, 6 188 235 25
- check "Activer/désactiver", 11, 6 218 114 20
- button "Etat de l'autojoin (on/off)", 12, 115 218 126 20
- }
- on 1:dialog:ajoin:init:*:{
- if %ajoin == 1 { did -c 11 }
- menu * {
- Auto-join:autoj
- }
- alias autoj { dialog -m ajoin ajoin }
- on 1:dialog:ajoin:edit:*:{
- if ($did == 2) set %achan $did(ajoin,2)
- if ($did == 4) set %aserv $did(ajoin,4)
- }
- on 1:dialog:ajoin:sclick:*:{
- if ($did == 5) ajoin -a %aserv %achan
- if ($did == 6) ajoin -r %aserv %achan
- if ($did == 7) ajoin -c %aserv
- if ($did == 8) ajoin -g %aserv
- if ($did == 9) ajoin -d
- if ($did == 10) ajoin -Mg
- if ($did == 11) {
- if ($did(ajoin,11).state == 1) { ajoin 1 }
- else { ajoin 0 }
- }
- if ($did == 12) ajoin
- }
-
- ------------------------------------------
- alias ajoin {
- if ($regex($1,/^-a$/i) == 1) {
- if ($regex($2,/[A-Z0-9]/i) == 0) {
- echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($2,/[A-Z0-9]/i) == 1) {
- noop $regsub($2,,,%ane)
- }
- if ($regex($3-,/[A-Z0-9]/i) == 0) {
- echo -a Pas de salon spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($3-,/[A-Z0-9]/i) == 1) {
- var %spc = $calc($regex($3-,/\s/gi) + 1)
- if ($regex($3-,/[&%#]\S+/xig) != %spc) {
- echo -a Les salons doivent avoir ce prefixe : #
- return
- }
- }
- if ($regex($3-,/[&%#]\S+/xig) == %spc) {
- if ($numtok($hget(Ajoin,$2),32) == 0) {
- hadd -m Ajoin $2 $3-
- noop $regsub($3-,/\s/g,$chr(44),%lmnop)
- echo -a Ajouter %lmnop sur $2
- unset %lmnop
- return
- }
- elseif ($numtok($hget(Ajoin,$2),32) > 0) {
- var %xzs = 1
- var %chsjsh = $hget(Ajoin,$2)
- while (%xzs <= $numtok($hget(Ajoin,$2),32)) {
- hadd -m Ajoin $2 %chsjsh $+ $chr(32) $+ $3-
- inc %xzs
- noop $regsub($3-,/\s/g,$chr(44),%lmnop)
- echo -a Ajouter %lmnop sur $2
- unset %lmnop
- return
- }
- }
- }
- }
- if ($regex($1,/^-c$/i) == 1) {
- if ($regex($2,/[A-Z0-9]/i) == 0) {
- echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 1) {
- echo -a Entrez un server
- return
- }
- if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 0) {
- var %exa = $iif($hfind(Ajoin,$2),1,0)
- if (%exa) {
- noop $regsub($2,,,%rne)
- hdel Ajoin %rne
- echo -a $2 a été effacer de la Database
- }
- elseif (!%exa) {
- echo -a $2 Nexiste pas dans la Database
- return
- }
- }
- }
- if ($regex($1,/^-g$/i) == 1) {
- if ($regex($2,/[A-Z0-9]/i) == 0) {
- echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 1) {
- echo -a Entrez un server
- return
- }
- if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 0) {
- var %exa = $iif($hfind(Ajoin,$2),1,0)
- if (%exa) {
- echo -a Salon de $2 :
- noop $regsub($hget(Ajoin,$hfind(Ajoin,$2)),/\s/g,$chr(44),%j)
- echo -a %j
- }
- elseif (!%exa) {
- echo -a $2 n'est pas dans la Database
- }
- }
- }
- if ($regex($1,/^-r$/i) == 1) {
- if ($regex($2,/[A-Z0-9]/i) == 0) {
- echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($3,/[A-Z0-9]/i) == 0) {
- echo -a Pas de salon spécifier. Veuillez entrer un server et un salon.
- return
- }
- if ($regex($4-,/[A-Z0-9]/i) == 1) {
- echo -a Entrer un salon et un server
- return
- }
- if ($regex($3,/[&%#]\S+/xig) == 0) {
- echo -a Les salons doivent avoir comme préfixe : #
- return
- }
- if ($regex($3,/[&%#]\S+/xig) == 1) && ($regex($4-,/[A-Z0-9]/i) == 0) {
- var %find2 = $deltok($hget(Ajoin,$2),$findtok($hget(Ajoin,$2),$3,1,32),32)
- hadd -m Ajoin $2 %find2
- echo -a $3 a été effacer de $2
- }
- }
- if ($regex($1,/^-d$/i) == 1) {
- if ($regex($2-,/[A-Z0-9]/i) == 0) {
- hfree Ajoin
- echo -a La database a bien été effacer
- }
- }
- if ($regex($1,/^-Mg$/i) == 1) {
- if ($regex($2-,/[A-Z0-9]/i) == 0) {
- var %a = 1
- echo -a Listage de tout les salons et les server...
- echo -a $chr(160)
- while (%a <= $hget(Ajoin,0).item) {
- linesep
- echo -a $hget(Ajoin,$ifmatch).item : $replace($hget(Ajoin,$hget(Ajoin,$ifmatch).item),$chr(32),$chr(44))
- linesep
- inc %a
- }
- linesep
- echo -a Fin du Listage
- linesep
- }
- }
- if ($regex($1,/^1$/i) == 1) {
- if ($regex($2-,/[A-Z0-9]/i) == 0) {
- set %ajoin 1
- echo -a L'autojoin à été mis sur On
- }
- }
- if ($regex($1,/^0$/i) == 1) {
- if ($regex($2-,/[A-Z0-9]/i) == 0) {
- set %ajoin 0
- echo -a L'auto-join a été mis sur Off
- }
- }
- if ($regex($1-,/[A-z0-9]/ig) == 0) {
- if (!%ajoin) {
- echo -a S'il vous plait démarrer ou arreter l'auto-join
- return
- }
- elseif (%ajoin) {
- echo -a L'auto-join est $+ $iif(%ajoin == 1,Activer,Désactiver)
- }
- }
- }
-
- on *:connect:if (%ajoin) && ($hget(Ajoin,$server)) join $replace($v2,$chr(44),$chr(32))
- on *:start:{
- hmake -s Ajoin 1000
- if ($isfile(Ajoin.dat)) { hload Ajoin Ajoin.dat }
- }
- on *:exit:hsave -o Ajoin Ajoin.dat
- on *:unload:unset %ane %rne %j %ajoin %lmnop
dialog ajoin {
title "Auto - join"
size -1 -1 247 238
option pixels
text "Entrer un Salon à joindre", 1, 6 4 235 16
edit "", 2, 6 27 235 20
text "Entre un server (ex : Voila , EpiKnet , ...)", 3, 6 53 235 16
edit "", 4, 6 75 235 21
button "Ajouter", 5, 6 103 116 25
button "Effacer", 6, 125 103 116 25
button "Effacer tout les autojoins d'un server", 7, 5 131 235 25
button "Liste server spécifier", 8, 6 160 116 25
button "Tout effacer", 9, 125 160 116 25
button "Liste server et Salon complète.", 10, 6 188 235 25
check "Activer/désactiver", 11, 6 218 114 20
button "Etat de l'autojoin (on/off)", 12, 115 218 126 20
}
on 1:dialog:ajoin:init:*:{
if %ajoin == 1 { did -c 11 }
menu * {
Auto-join:autoj
}
alias autoj { dialog -m ajoin ajoin }
on 1:dialog:ajoin:edit:*:{
if ($did == 2) set %achan $did(ajoin,2)
if ($did == 4) set %aserv $did(ajoin,4)
}
on 1:dialog:ajoin:sclick:*:{
if ($did == 5) ajoin -a %aserv %achan
if ($did == 6) ajoin -r %aserv %achan
if ($did == 7) ajoin -c %aserv
if ($did == 8) ajoin -g %aserv
if ($did == 9) ajoin -d
if ($did == 10) ajoin -Mg
if ($did == 11) {
if ($did(ajoin,11).state == 1) { ajoin 1 }
else { ajoin 0 }
}
if ($did == 12) ajoin
}
------------------------------------------
alias ajoin {
if ($regex($1,/^-a$/i) == 1) {
if ($regex($2,/[A-Z0-9]/i) == 0) {
echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($2,/[A-Z0-9]/i) == 1) {
noop $regsub($2,,,%ane)
}
if ($regex($3-,/[A-Z0-9]/i) == 0) {
echo -a Pas de salon spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($3-,/[A-Z0-9]/i) == 1) {
var %spc = $calc($regex($3-,/\s/gi) + 1)
if ($regex($3-,/[&%#]\S+/xig) != %spc) {
echo -a Les salons doivent avoir ce prefixe : #
return
}
}
if ($regex($3-,/[&%#]\S+/xig) == %spc) {
if ($numtok($hget(Ajoin,$2),32) == 0) {
hadd -m Ajoin $2 $3-
noop $regsub($3-,/\s/g,$chr(44),%lmnop)
echo -a Ajouter %lmnop sur $2
unset %lmnop
return
}
elseif ($numtok($hget(Ajoin,$2),32) > 0) {
var %xzs = 1
var %chsjsh = $hget(Ajoin,$2)
while (%xzs <= $numtok($hget(Ajoin,$2),32)) {
hadd -m Ajoin $2 %chsjsh $+ $chr(32) $+ $3-
inc %xzs
noop $regsub($3-,/\s/g,$chr(44),%lmnop)
echo -a Ajouter %lmnop sur $2
unset %lmnop
return
}
}
}
}
if ($regex($1,/^-c$/i) == 1) {
if ($regex($2,/[A-Z0-9]/i) == 0) {
echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 1) {
echo -a Entrez un server
return
}
if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 0) {
var %exa = $iif($hfind(Ajoin,$2),1,0)
if (%exa) {
noop $regsub($2,,,%rne)
hdel Ajoin %rne
echo -a $2 a été effacer de la Database
}
elseif (!%exa) {
echo -a $2 Nexiste pas dans la Database
return
}
}
}
if ($regex($1,/^-g$/i) == 1) {
if ($regex($2,/[A-Z0-9]/i) == 0) {
echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 1) {
echo -a Entrez un server
return
}
if ($regex($2,/[A-Z0-9]/i) == 1) && ($regex($3-,/[A-Z0-9]/i) == 0) {
var %exa = $iif($hfind(Ajoin,$2),1,0)
if (%exa) {
echo -a Salon de $2 :
noop $regsub($hget(Ajoin,$hfind(Ajoin,$2)),/\s/g,$chr(44),%j)
echo -a %j
}
elseif (!%exa) {
echo -a $2 n'est pas dans la Database
}
}
}
if ($regex($1,/^-r$/i) == 1) {
if ($regex($2,/[A-Z0-9]/i) == 0) {
echo -a Pas de server spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($3,/[A-Z0-9]/i) == 0) {
echo -a Pas de salon spécifier. Veuillez entrer un server et un salon.
return
}
if ($regex($4-,/[A-Z0-9]/i) == 1) {
echo -a Entrer un salon et un server
return
}
if ($regex($3,/[&%#]\S+/xig) == 0) {
echo -a Les salons doivent avoir comme préfixe : #
return
}
if ($regex($3,/[&%#]\S+/xig) == 1) && ($regex($4-,/[A-Z0-9]/i) == 0) {
var %find2 = $deltok($hget(Ajoin,$2),$findtok($hget(Ajoin,$2),$3,1,32),32)
hadd -m Ajoin $2 %find2
echo -a $3 a été effacer de $2
}
}
if ($regex($1,/^-d$/i) == 1) {
if ($regex($2-,/[A-Z0-9]/i) == 0) {
hfree Ajoin
echo -a La database a bien été effacer
}
}
if ($regex($1,/^-Mg$/i) == 1) {
if ($regex($2-,/[A-Z0-9]/i) == 0) {
var %a = 1
echo -a Listage de tout les salons et les server...
echo -a $chr(160)
while (%a <= $hget(Ajoin,0).item) {
linesep
echo -a $hget(Ajoin,$ifmatch).item : $replace($hget(Ajoin,$hget(Ajoin,$ifmatch).item),$chr(32),$chr(44))
linesep
inc %a
}
linesep
echo -a Fin du Listage
linesep
}
}
if ($regex($1,/^1$/i) == 1) {
if ($regex($2-,/[A-Z0-9]/i) == 0) {
set %ajoin 1
echo -a L'autojoin à été mis sur On
}
}
if ($regex($1,/^0$/i) == 1) {
if ($regex($2-,/[A-Z0-9]/i) == 0) {
set %ajoin 0
echo -a L'auto-join a été mis sur Off
}
}
if ($regex($1-,/[A-z0-9]/ig) == 0) {
if (!%ajoin) {
echo -a S'il vous plait démarrer ou arreter l'auto-join
return
}
elseif (%ajoin) {
echo -a L'auto-join est $+ $iif(%ajoin == 1,Activer,Désactiver)
}
}
}
on *:connect:if (%ajoin) && ($hget(Ajoin,$server)) join $replace($v2,$chr(44),$chr(32))
on *:start:{
hmake -s Ajoin 1000
if ($isfile(Ajoin.dat)) { hload Ajoin Ajoin.dat }
}
on *:exit:hsave -o Ajoin Ajoin.dat
on *:unload:unset %ane %rne %j %ajoin %lmnop
Conclusion
Historique
- 08 juin 2007 16:55:43 :
- amélioration à la suite des conseil d'RCA ArKanis
- 08 juin 2007 17:52:33 :
- amélioration suite aux conseils de RCA ArKanis et de Wims
- 09 juin 2007 13:51:22 :
- 3 ème mise à jour sur les conseils de wims
- 09 juin 2007 15:16:23 :
- voila voila encore un petite amélioration =) merci a wims
- 09 juin 2007 15:17:18 :
- un oublis
- 28 juin 2007 15:27:38 :
- screenshot
Sources du même auteur
Sources de la même categorie
Sources en rapport avec celle ci
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
probleme de hashtables [ par kishkaya ]
ben j'ai cherché dans l'aide mais j'ai pas trouvéje crés un systeme de log de membres avec une hashtablej'ai deux problemes : if ($hget(log) != lo
modification de hashtable des que quelqu'un quit un salon [ par kishkaya ]
Voila j'ai essayé plein de syntax mais ca a rien donnéj'aimerai que l'on supprime l'insertion $gettok($nick,1,124) de la hashtable 'authen' quand $nic
Afficher le contenu d'une hashtable [ par kishkaya ]
voila le contenu d'une hashtable est sous cette forme :$nick|logincela est geré par un bot et j'aimerai rajouter une fenetre, une windows dans ce bot
screen autojoin [ par dunmer ]
Salut à tous , precedemment j'ai posté une soure qui était un autojoin , j'ai suivi vos conseils et ameliorer le dialog et je vou
hashtable et pixel [ par ranny ]
Bonsoir tout le monde,Voila j'ai 2 petites questions.1/ Comment intervertir les valeurs d'une variable $hget.Par exemple comment donner la valeur de $
probleme d'autojoin forcer sur un salon [ par ptit_chat10 ]
Bonjour a tous Est ce qu'une personne sais comment retirer sur le script frisson V5 l'autojoin forcé sur le salon frisson ? est ce qu'une personne po
Niubot Orange [ par AmelieLyon ]
bonjour je souhaiterai savoir comment faire pour que quand je joint un salon avec leur nouveau "bot" sur orange il me op automatiquement? en regarda
|
|