Accueil > > > SYSTEM AWAY + REPONDEUR [NOUVEAU]
SYSTEM AWAY + REPONDEUR [NOUVEAU]
Information sur la source
Description
Voila c'est ma premiere source que je post ici, car ça ne fait que 2 semaine environ que j'ai commencer a scripter avec mIRC. Je sais que bcp vont dire que c'est du deja vu etc etc mais vous savez quand on commence on va pas non plus sortir l'addon du siecle lol alors jpense c deja mieux que rien :]
Sinon pour tout ce qui est critique j'aimerai avoir des bonne critique qui explique ce qui va pas et pourquoi, si il peut y avoir de la simplification de code ( je suis presque sur que oui ) etc etc.
Ce serait cool de pas poster des commentaires du genre "oui, ton addon il est nul", "oui c'est mal scripter" ... car si je le poste ici c'est pour que vous m'aider un ti peu afin d'apprendre de nouvelle focntion et autres grace au commentaire que vous posterez.
Sur ce merci et bonne analyse :
Source
- on *:dialog:away1:init:0:{
- if ( $readini away.ini Configuration SpeedAuto1 == 1 ) { did -c away1 23 }
- else { did -u away1 23 }
-
- if ( $readini away.ini Configuration Auto.Away1 == 1) { did -c away1 15 }
- else { did -u away1 15 }
-
- if ( $readini away.ini Repondeur Etat == 1) { did -c away1 31 }
- else { did -u away1 31 }
-
- if ( $readini away.ini Configuration Active.Log == 1) { did -c away1 28 }
- else { did -u away1 28 }
-
- did -a away1 29 %repondeur.phrase
-
- did -a away1 4 $readini away.ini Configuration Raison
- did -a away1 8 $readini away.ini Configuration Nick.Away
- did -a away1 12 $readini away.ini Configuration Nick.Retour
-
- did -a away1 3 $AwayStatus
- did -a away1 27 $AwayStatus
-
- did -a away1 19 Oqp
- did -a away1 19 ZzZ
- did -a away1 19 AwAy
- did -a away1 19 TeLe
- did -a away1 19 LyCeE
- did -a away1 19 EaTiNg
- did -a away1 19 PaS`La
-
- did -a away1 25 20
- did -a away1 25 40
- did -a away1 25 60
-
- did -a away1 16 20
- did -a away1 16 40
- did -a away1 16 60
- }
-
- on *:dialog:away1:edit:4:writeini away.ini Configuration Raison $did(4)
- on *:dialog:away1:edit:5:writeini away.ini Configuration heure $did(5)
- on *:dialog:away1:edit:8:writeini away.ini Configuration Nick.Away $did(8)
- on *:dialog:away1:edit:12:writeini away.ini Configuration Nick.Retour $did(12)
- on *:dialog:away1:edit:33:writeini away.ini Configuration minutes $did(33)
-
- on *:dialog:away1:sclick:14:echo $active 1*4 Mode 12[AwAy12] 1:: 12[ 2Raison :4 $readini away.ini Configuration Raison 12] 1:: 12[ 3Durée : ~4 $readini away.ini Configuration heure $+ H $+ $readini away.ini Configuration minutes 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: *
- on *:dialog:away1:sclick:16:{ set %awaytime $did(16).seltext }
- on *:dialog:away1:sclick:19:{ writeini away.ini Configuration Raison $did(19).seltext }
- on *:dialog:away1:sclick:25:{ set %speed.awaytime $did(25).seltext }
-
- on *:dialog:away1:sclick:3:{
- if ( $away == $false ) { partir }
- elseif ( $away == $true ) { revenir }
- if ( $away == $true ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
- elseif ( $away == $false ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
- }
-
- on *:dialog:away1:sclick:15:{
- if ( $did(15).state == 1 ) { set %awayauto Oui }
- else { set %awayauto Non }
- writeini away.ini Configuration Auto.Away1 $did(15).state
- }
-
- on *:dialog:away1:sclick:23:{
- if ( $did(23).state == 1 ) { set %speedauto Oui }
- else { set %speedauto Non }
- writeini away.ini Configuration SpeedAuto1 $did(23).state
- }
-
- on *:dialog:away1:sclick:27:{
- if ( $away == $false ) { speed.away }
- elseif ( $away == $true ) { revenir }
- if ( $away == $true ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
- elseif ( $away == $false ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
- }
-
-
- dialog away1 {
- title "Away System"
- size -1 -1 133 119
- option dbu
- tab "Away", 1, 4 1 124 114
- edit "", 4, 46 29 75 10, tab 1 autohs
- edit "", 5, 32 69 14 10, tab 1 autohs
- text "Durée", 9, 12 70 18 8, tab 1
- text "Raison : ", 7, 12 30 26 8, tab 1
- box "Configuration", 10, 8 16 117 97, tab 1
- button "", 3, 10 95 56 8, tab 1
- text "Heure(s)", 18, 47 70 26 8, tab 1 center
- edit "", 33, 73 69 17 10, tab 1
- text "Mins", 34, 93 70 13 8, tab 1
- text "Nick Away", 6, 12 43 27 8, tab 1
- edit "", 8, 46 42 75 10, tab 1
- text "Nick Retour", 11, 12 56 32 8, tab 1
- edit "", 12, 46 55 75 10, tab 1
- button "Aperçut", 14, 67 95 56 8, tab 1
- check "Auto-Away -", 15, 12 83 40 8, tab 1
- combo 16, 54 82 23 10, tab 1 sort vsbar drop
- text "Minutes", 17, 80 83 20 8, tab 1
- tab "Speed / Répondeur", 2
- box "Away Rapide", 20, 8 20 117 34, tab 2
- box "Répondeur", 21, 8 57 117 45, tab 2
- text "Choisir Away : ", 22, 12 30 38 8, tab 2
- check "Auto-Away ", 23, 12 41 38 10, tab 2
- text "Durée : ", 24, 55 42 25 8, tab 2
- combo 25, 86 41 28 10, tab 2 sort vsbar drop
- button "", 27, 89 29 30 10, tab 2
- check "Active Log", 28, 12 89 39 10, tab 2
- edit "", 29, 11 77 110 10, tab 2 autohs
- text "Message Répondeur : ", 30, 11 67 50 8, tab 2
- check "Activer Repondeur", 31, 60 89 57 10, tab 2
- combo 19, 49 28 38 11, tab 2 sort vsbar drop
- button ":: [ Fermer ] ::", 35, 10 103 113 8, ok
- }
-
- alias F10 { dialog -m away1 away1 }
-
- alias partir {
- did -c away1 31
- unset %nickspeed
- set %why1 $readini away.ini Configuration Raison
- set %nickaway $readini away.ini Configuration Nick.Retour
- away Je suis away [::] Raison : $readini away.ini Configuration Raison
- amsg 1*4 Mode 12[AwAy12] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 3Durée : ~4 $readini away.ini Configuration heure $+ H $+ $readini away.ini Configuration minutes 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: * | nick %nickspeed $+ -[ $+ %why $+ ]
- if ( %awayauto == Oui && %awaytime == 20 ) { timer5 0 1200 tpsaway }
- elseif ( %awayauto == Oui && %awaytime == 40 ) { timer5 0 2400 tpsaway }
- elseif ( %awayauto == Oui && %awaytime == 60 ) { timer5 0 3600 tpsaway }
- nick $readini away.ini Configuration Nick.Away
- }
-
- alias speed.away {
- did -c away1 31
- set %why1 $readini away.ini Configuration raison
- unset %nickaway
- set %nickspeed $me
- away Je suis away [::] Raison : $readini away.ini Configuration Raison
- amsg 1*4 Mode 12[1Speed5AwAy12] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: * | nick %nickspeed $+ -[ $+ %why1 $+ ]
- if ( %speedauto == Oui && %speed.awaytime == 20 ) { timer7 0 1200 tpsaway }
- elseif ( %speedauto == Oui && %speed.awaytime == 40 ) { timer7 0 2400 tpsaway }
- elseif ( %speedauto == Oui && %speed.awaytime == 60 ) { timer7 0 3600 tpsaway }
- }
-
- alias AwayStatus {
- if ( $away == $false ) { return Partir }
- if ( $away == $true ) { return Revenir }
- }
-
- alias revenir {
- set %tempsaway $duration($awaytime)
- away
- timers off
- amsg 1* 4Est 6De 12Retour 1:: 12 [ 7Raison 3AwAy :4 %why1 12] 1:: 12[ 5Temps Away :4 %tempsaway 12] 1:: 1*
- if (%nickaway == $readini away.ini Configuration Nick.Retour ) { nick %nickaway }
- else { nick %nickspeed }
- unset %why1
- did -u away1 31
- writeini away.ini Repondeur Etat $did(31).state
- if ( $me != %nickspeed || $me != %nickaway ) { pseudo }
- else { return }
- }
-
- alias tpsaway {
- set %duree $duration($awaytime)
- amsg 1*4 [12Auto-3Away4] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 3Depuis : ~4 %duree 12] 1:: *
- }
-
- ==========
- | Repondeur |
- ==========
-
- on *:dialog:away1:sclick:31:{
- if ( $did(31).state == 1 ) { set %repondeur.active Oui }
- else { set %repondeur.active Non }
- writeini away.ini Repondeur Etat $did(31).state
- }
-
- on *:dialog:away1:sclick:28:{
- if ( $did(28).state == 1 ) { set %act.log Oui }
- else { set %act.log Non }
- writeini away.ini Configuration Active.Log $did(28).state
- }
-
- on *:dialog:away1:edit:29:set %repondeur.phrase $did(29)
-
- on *: OPEN:?:{
- if ( $away == $true && %repondeur.active == Oui && %act.log == Oui ) { msg $nick $eval(%repondeur.phrase,2) }
- else { return }
- }
-
- on *:text:*!msg*:?:{
- if ($exists(Pv/ $+ $nick $+ .txt) == $false && %repondeur.active == Oui && %act.log == Oui ) {
- write pv/ $+ $nick $+ .txt ----------------------------------------------
- write pv/ $+ $nick $+ .txt - Message Envoyer Par $nick -
- write pv/ $+ $nick $+ .txt ----------------------------------------------
- write pv/ $+ $nick $+ .txt $timestamp < $+ $nick $+ > $remove($1-,!msg)
- msg $nick Merci votre message a bien été enregistrer ;)
- }
- elseif ($exists(Pv/ $+ $nick $+ .txt) == $true && %repondeur.active == Oui && %act.log == Oui) { write pv/ $+ $nick $+ .txt $timestamp < $+ $nick $+ > $remove($1-,!msg)
- msg $nick Merci votre message a bien été enregistrer ;)
- }
- }
on *:dialog:away1:init:0:{
if ( $readini away.ini Configuration SpeedAuto1 == 1 ) { did -c away1 23 }
else { did -u away1 23 }
if ( $readini away.ini Configuration Auto.Away1 == 1) { did -c away1 15 }
else { did -u away1 15 }
if ( $readini away.ini Repondeur Etat == 1) { did -c away1 31 }
else { did -u away1 31 }
if ( $readini away.ini Configuration Active.Log == 1) { did -c away1 28 }
else { did -u away1 28 }
did -a away1 29 %repondeur.phrase
did -a away1 4 $readini away.ini Configuration Raison
did -a away1 8 $readini away.ini Configuration Nick.Away
did -a away1 12 $readini away.ini Configuration Nick.Retour
did -a away1 3 $AwayStatus
did -a away1 27 $AwayStatus
did -a away1 19 Oqp
did -a away1 19 ZzZ
did -a away1 19 AwAy
did -a away1 19 TeLe
did -a away1 19 LyCeE
did -a away1 19 EaTiNg
did -a away1 19 PaS`La
did -a away1 25 20
did -a away1 25 40
did -a away1 25 60
did -a away1 16 20
did -a away1 16 40
did -a away1 16 60
}
on *:dialog:away1:edit:4:writeini away.ini Configuration Raison $did(4)
on *:dialog:away1:edit:5:writeini away.ini Configuration heure $did(5)
on *:dialog:away1:edit:8:writeini away.ini Configuration Nick.Away $did(8)
on *:dialog:away1:edit:12:writeini away.ini Configuration Nick.Retour $did(12)
on *:dialog:away1:edit:33:writeini away.ini Configuration minutes $did(33)
on *:dialog:away1:sclick:14:echo $active 1*4 Mode 12[AwAy12] 1:: 12[ 2Raison :4 $readini away.ini Configuration Raison 12] 1:: 12[ 3Durée : ~4 $readini away.ini Configuration heure $+ H $+ $readini away.ini Configuration minutes 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: *
on *:dialog:away1:sclick:16:{ set %awaytime $did(16).seltext }
on *:dialog:away1:sclick:19:{ writeini away.ini Configuration Raison $did(19).seltext }
on *:dialog:away1:sclick:25:{ set %speed.awaytime $did(25).seltext }
on *:dialog:away1:sclick:3:{
if ( $away == $false ) { partir }
elseif ( $away == $true ) { revenir }
if ( $away == $true ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
elseif ( $away == $false ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
}
on *:dialog:away1:sclick:15:{
if ( $did(15).state == 1 ) { set %awayauto Oui }
else { set %awayauto Non }
writeini away.ini Configuration Auto.Away1 $did(15).state
}
on *:dialog:away1:sclick:23:{
if ( $did(23).state == 1 ) { set %speedauto Oui }
else { set %speedauto Non }
writeini away.ini Configuration SpeedAuto1 $did(23).state
}
on *:dialog:away1:sclick:27:{
if ( $away == $false ) { speed.away }
elseif ( $away == $true ) { revenir }
if ( $away == $true ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
elseif ( $away == $false ) { did -a away1 3 $AwayStatus | did -a away1 27 $AwayStatus }
}
dialog away1 {
title "Away System"
size -1 -1 133 119
option dbu
tab "Away", 1, 4 1 124 114
edit "", 4, 46 29 75 10, tab 1 autohs
edit "", 5, 32 69 14 10, tab 1 autohs
text "Durée", 9, 12 70 18 8, tab 1
text "Raison : ", 7, 12 30 26 8, tab 1
box "Configuration", 10, 8 16 117 97, tab 1
button "", 3, 10 95 56 8, tab 1
text "Heure(s)", 18, 47 70 26 8, tab 1 center
edit "", 33, 73 69 17 10, tab 1
text "Mins", 34, 93 70 13 8, tab 1
text "Nick Away", 6, 12 43 27 8, tab 1
edit "", 8, 46 42 75 10, tab 1
text "Nick Retour", 11, 12 56 32 8, tab 1
edit "", 12, 46 55 75 10, tab 1
button "Aperçut", 14, 67 95 56 8, tab 1
check "Auto-Away -", 15, 12 83 40 8, tab 1
combo 16, 54 82 23 10, tab 1 sort vsbar drop
text "Minutes", 17, 80 83 20 8, tab 1
tab "Speed / Répondeur", 2
box "Away Rapide", 20, 8 20 117 34, tab 2
box "Répondeur", 21, 8 57 117 45, tab 2
text "Choisir Away : ", 22, 12 30 38 8, tab 2
check "Auto-Away ", 23, 12 41 38 10, tab 2
text "Durée : ", 24, 55 42 25 8, tab 2
combo 25, 86 41 28 10, tab 2 sort vsbar drop
button "", 27, 89 29 30 10, tab 2
check "Active Log", 28, 12 89 39 10, tab 2
edit "", 29, 11 77 110 10, tab 2 autohs
text "Message Répondeur : ", 30, 11 67 50 8, tab 2
check "Activer Repondeur", 31, 60 89 57 10, tab 2
combo 19, 49 28 38 11, tab 2 sort vsbar drop
button ":: [ Fermer ] ::", 35, 10 103 113 8, ok
}
alias F10 { dialog -m away1 away1 }
alias partir {
did -c away1 31
unset %nickspeed
set %why1 $readini away.ini Configuration Raison
set %nickaway $readini away.ini Configuration Nick.Retour
away Je suis away [::] Raison : $readini away.ini Configuration Raison
amsg 1*4 Mode 12[AwAy12] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 3Durée : ~4 $readini away.ini Configuration heure $+ H $+ $readini away.ini Configuration minutes 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: * | nick %nickspeed $+ -[ $+ %why $+ ]
if ( %awayauto == Oui && %awaytime == 20 ) { timer5 0 1200 tpsaway }
elseif ( %awayauto == Oui && %awaytime == 40 ) { timer5 0 2400 tpsaway }
elseif ( %awayauto == Oui && %awaytime == 60 ) { timer5 0 3600 tpsaway }
nick $readini away.ini Configuration Nick.Away
}
alias speed.away {
did -c away1 31
set %why1 $readini away.ini Configuration raison
unset %nickaway
set %nickspeed $me
away Je suis away [::] Raison : $readini away.ini Configuration Raison
amsg 1*4 Mode 12[1Speed5AwAy12] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 7Heure Départ :4 $time(HH:nn) 12] 1:: * | nick %nickspeed $+ -[ $+ %why1 $+ ]
if ( %speedauto == Oui && %speed.awaytime == 20 ) { timer7 0 1200 tpsaway }
elseif ( %speedauto == Oui && %speed.awaytime == 40 ) { timer7 0 2400 tpsaway }
elseif ( %speedauto == Oui && %speed.awaytime == 60 ) { timer7 0 3600 tpsaway }
}
alias AwayStatus {
if ( $away == $false ) { return Partir }
if ( $away == $true ) { return Revenir }
}
alias revenir {
set %tempsaway $duration($awaytime)
away
timers off
amsg 1* 4Est 6De 12Retour 1:: 12 [ 7Raison 3AwAy :4 %why1 12] 1:: 12[ 5Temps Away :4 %tempsaway 12] 1:: 1*
if (%nickaway == $readini away.ini Configuration Nick.Retour ) { nick %nickaway }
else { nick %nickspeed }
unset %why1
did -u away1 31
writeini away.ini Repondeur Etat $did(31).state
if ( $me != %nickspeed || $me != %nickaway ) { pseudo }
else { return }
}
alias tpsaway {
set %duree $duration($awaytime)
amsg 1*4 [12Auto-3Away4] 1:: 12[ 2Raison :4 %why1 12] 1:: 12[ 3Depuis : ~4 %duree 12] 1:: *
}
==========
| Repondeur |
==========
on *:dialog:away1:sclick:31:{
if ( $did(31).state == 1 ) { set %repondeur.active Oui }
else { set %repondeur.active Non }
writeini away.ini Repondeur Etat $did(31).state
}
on *:dialog:away1:sclick:28:{
if ( $did(28).state == 1 ) { set %act.log Oui }
else { set %act.log Non }
writeini away.ini Configuration Active.Log $did(28).state
}
on *:dialog:away1:edit:29:set %repondeur.phrase $did(29)
on *: OPEN:?:{
if ( $away == $true && %repondeur.active == Oui && %act.log == Oui ) { msg $nick $eval(%repondeur.phrase,2) }
else { return }
}
on *:text:*!msg*:?:{
if ($exists(Pv/ $+ $nick $+ .txt) == $false && %repondeur.active == Oui && %act.log == Oui ) {
write pv/ $+ $nick $+ .txt ----------------------------------------------
write pv/ $+ $nick $+ .txt - Message Envoyer Par $nick -
write pv/ $+ $nick $+ .txt ----------------------------------------------
write pv/ $+ $nick $+ .txt $timestamp < $+ $nick $+ > $remove($1-,!msg)
msg $nick Merci votre message a bien été enregistrer ;)
}
elseif ($exists(Pv/ $+ $nick $+ .txt) == $true && %repondeur.active == Oui && %act.log == Oui) { write pv/ $+ $nick $+ .txt $timestamp < $+ $nick $+ > $remove($1-,!msg)
msg $nick Merci votre message a bien été enregistrer ;)
}
}
Conclusion
Pour l'utiliser il vous suffit simplement de pressez la touche F10
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
SQL SERVER : QUERY NOTIFICATION OU COMMENT êTRE NOTIFIé DE MODIFICATIONS DE DONNéES CôTé APPLICATIONSQL SERVER : QUERY NOTIFICATION OU COMMENT êTRE NOTIFIé DE MODIFICATIONS DE DONNéES CôTé APPLICATION par christian
Cette fonctionnalité à vue le jour dans Ado.Net 2.0 et s'appuie sur SQL Server 2005 (et plus) même si elle fonctionne avec SQL Server 2000. Le principe de fonctionnement côté applicatif est assez simple, on fournit une requête et lorsque le résultat d...
Cliquez pour lire la suite de l'article par christian [WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL?[WF4] UN BINDING ACTIVITY/ACTIVITYDESIGNER QUI PASSE MAL? par JeremyJeanson
Certain d'entre vous on peut être vécu cette situation embarrassante après quelques temps passer avec WF4 : Au début avec mon " ActivityDesigner" , tout allait bien. Et puis un jour j'ai au des problèmes de " Binding" . Alors nous sommes allé sur le site ...
Cliquez pour lire la suite de l'article par JeremyJeanson MYTIC - SHAREPOINT 2010 : DéJà UN MYTHE MICROSOFT ?MYTIC - SHAREPOINT 2010 : DéJà UN MYTHE MICROSOFT ? par junarnoalg
La prochaine session de MyTIC aura lieu à Namur, le 23 mars prochain. Pendant presque une heure, nous parlerons de SharePoint 2010. Voici un aperçu du programme.
Accueil : 17h30 Début de la session : 18h00 - Les nouvelles int...
Cliquez pour lire la suite de l'article par junarnoalg [MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA[MIX10] KEYNOTE DEUXIèME JOURNéE - INTERNET EXPLORER 9, HTML5, VISUAL STUDIO 2010, ODATA par cyril
Le deuxième keynote du mix fut très riche en contenu. Internet Explorer 9 Juste un après le lancement de Internet Explorer 8, Microsoft a dévoilé les nouveautés de Internet Explorer 9. Désormais, IE supportera HTML5, SVG et CSS3. L'élément ...
Cliquez pour lire la suite de l'article par cyril
Logiciels
Academy System (10.9.4.0)ACADEMY SYSTEM (10.9.4.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Xilisoft Convertisseur Vidéo Ultimate (5.1.39.0305)XILISOFT CONVERTISSEUR VIDéO ULTIMATE (5.1.39.0305)Xilisoft Convertisseur Vidéo Ultimate est un outil puissant de conversion vidéo, facile à utilise... Cliquez pour télécharger Xilisoft Convertisseur Vidéo Ultimate Xilisoft DVD Ripper Ultimate (5.0.64.0304)XILISOFT DVD RIPPER ULTIMATE (5.0.64.0304)Xilisoft DVD Ripper Ultimate est un logiciel excellent pour copier et convertir DVD vers presque ... Cliquez pour télécharger Xilisoft DVD Ripper Ultimate Rigs of Rods (63.3)RIGS OF RODS (63.3)c'est un jeu de multi-simulation camions,autobus voitures, avions, bateaux, hélicoptère avec défo... Cliquez pour télécharger Rigs of Rods
|