Logchan by diims :: pour bot :: totalement configurable

Description

'=[ LogChan by Diims ]='

"LogChan" Qu'est-ce que c'est ?
C'est un système de log pour bot, c'est à dire qu'il va afficher sur un salon définit, les événements Part/Join/Kick, etc ..

Q'entend-t-on par "totalement configurable" ?
- Changement de salon de Log,
- Activation/Désactivation de l'affichage des logs,
- Changement de couleurs d'affichage :
- Des énévements,
- Des décorations,
- Du texte.
(Tous ses changements peuvent être effectuées que par l'hébérgeur du bot)

Commandes disponible par la personne qui hébérge le bot :
!logchan aide|help
!logchan info
!logchan salon <#TonSalon>
!logchan status <on|off>
!logchan couleur event|deco|text
(Tous ses changements peuvent être effectuées que par l'hébérgeur du bot)

Source / Exemple :

<code basic> ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ;@@ ____ ____ ____ ____ @@ ;@@ | | | | | | | | | | |\ | @@ ;@@ | | | | __ | |____| |____| | \ | @@ ;@@ | | | | | | | | | | | | \ | @@ ;@@ |____ |____| |____| |____ | | | | | \| @@ ;@@ Log Chan By Diims @@ ;@@ @@ ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ dialog logchan { size -1 -1 183 280 title "'=[ LogChan ]='" box "Configurations :",1, 8 7 167 265 box "Général :",2, 15 22 152 75 text "Salon :",3, 30 39 100 20 edit "",4, 77 38 80 17, autohs text "Status :",5, 30 77 100 20 radio "On",6, 78 74 40 20 radio "Off",7, 120 74 40 20 text "",21, 30 58 80 20 text "",20, 115 58 20 20 box "Couleurs :",8, 15 100 152 99 text "Événéments :",9, 30 119 100 20 edit "",10, 100 118 40 17, autohs limit 2 text "Décoration :",11, 30 141 100 20 edit "",12, 100 139 40 17, autohs limit 2 text "Texte :",13, 30 162 100 20 edit "",14, 100 160 40 17, autohs limit 2 text "Code Couleur *",15, 72 180 100 20 text "*",16, 140 119 100 20 text "*",17, 140 140 100 20 text "*",18, 140 161 100 20 button "Enregistrer",19, 15 203 153 30 button "Valider && Fermer",22, 15 235 153 30, ok } on *:dialog:logchan:*:*: { if ($devent = init) { did -a $dname 4 %logchan.salon did -a $dname 10 %logchan.couleur.event did -a $dname 12 %logchan.couleur.deco did -a $dname 14 %logchan.couleur.text did -a $dname 20 %logchan.status did -a $dname 21 Status Actuel : } if ($devent = sclick) { if ($did == 6) { set %logchan.status On echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Activation de l'affichage des logs did -a $dname 20 $did(6) did -a $dname 21 Status Changé : } if ($did == 7) { set %logchan.status Off echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Désactivation de l'affichage des logs did -a $dname 20 $did(7) did -a $dname 21 Status Changé : } if ($did == 19 && $did(4)) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04-------------------------------------------------------------------------------- echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Informations : if (%logchan.salon == $did(4)) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Salon de log inchangé :07 %logchan.salon } else { set %logchan.salon $did(4) echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Salon de log Configuré :07 %logchan.salon join %logchan.salon } echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Status des logs :07 %logchan.status } if ($did == 19 && $did(10)) { if (%logchan.couleur.event == $did(10)) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des événements inchangé : $+ $did(10) Couleur } else { set %logchan.couleur.event $did(10) echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des événements : $+ $did(10) Couleur } } if ($did == 19 && $did(12)) { if (%logchan.couleur.deco == $did(12)) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des décorations inchangé : $+ $did(12) Couleur } else { set %logchan.couleur.deco $did(12) echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des décorations : $+ $did(12) Couleur } } if ($did == 19 && $did(14)) { if (%logchan.couleur.text == $did(14)) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur du texte inchangé : $+ $did(14) Couleur } else { set %logchan.couleur.text $did(14) echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur du texte : $+ $did(14) Couleur } echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04-------------------------------------------------------------------------------- } if ($did == 19) { if ($did(4) == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ERREUR : Aucun Salon de log présisé. Exemple :07 #LogChan } if (%logchan.status == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ERREUR : Aucun status des log n'est présisé. Cliquez sur 07On 04ou 07Off } if ($did(10) == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ERREUR : Code Couleur pour les Évenements non présisé. Exemple :07 04 } if ($did(12) == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ERREUR : Code Couleur pour la Décoration non présisé. Exemple :07 07 } if ($did(14) == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ERREUR : Code Couleur pour le Texte non présisé. Exemple :07 14 else { /dialog -c $dname $dname } } } } } menu menubar,channel,status { '=[ LogChan by Diims ]=' .Configurer: dialog -m logchan logchan .Informations: echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Infotmation 07: | echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Salon des logs :07 %logchan.salon | echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Status des logs :07 %logchan.status | echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des événements : $+ %logchan.couleur.event Couleur | echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur des décorations : $+ %logchan.couleur.deco Couleur | echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Couleur du texte : $+ %logchan.couleur.text Couleur } On *:CONNECT:{ if (%logchan.salon == $null) { echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04ALERTE: Tu as oublié de présiser/configurer le Salon où les Logs seront affichées. set %logchan.salon $$?"Choisisez le Salon où le Bot affichera les logs. Exemple : #LogChan" echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Salon Configuré :07 %logchan.salon join %logchan.salon } else { join %logchan.salon } } On *:JOIN:#:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Join  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick entre sur $chan ( $+ $nick($chan,0) Users) } } On *:PART:#:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Part  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick part de $chan $+ 1 $1-  $+ %logchan.couleur.text $+ ( $+ $calc($nick($chan,0)-1) Users) } } On *:QUIT:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Déconnexion  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick a quitté l'IRC : $1- } } On *:NICK:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Nick  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick change son pseudo en $newnick } } On *:TOPIC:#:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Topic  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick change le topic sur $chan : $1- } } On *:KICK:#: { if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Kick  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $knick a été kické par $nick sur $chan : $1-  $+ %logchan.couleur.text $+ ( $+ $calc($nick($chan,0)-1) Users) } } On *:RAWMODE:#:{ if ($chan == %logchan.salon) { halt } if (%logchan.status == On) { msg %logchan.salon  $+ %logchan.couleur.event $+ Mode  $+ %logchan.couleur.deco $+ : $+ %logchan.couleur.text $nick applique le mode $1- sur $chan } } On *:TEXT:*:#:{ if ($address($nick,2) == $address($me,2)) { if ($1 == !logchan) { if ($2 == $null || $2 == aide || $2 == help) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Aide 07]=' notice $nick 04Informations LogChan : 07!logchan info notice $nick 04Pour configurer un salon :07 !logchan salon <#TonSalon>. notice $nick 04Pour activer ou désactiver l'affichage des logs :07 !logchan status <on/off> notice $nick 04Pour configurer les couleurs :07 !logchan couleur <event|deco|text> <code couleur> } if ($2 == info) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Informations 07]=' notice $nick 04Salon des logs configuré :07 %logchan.salon notice $nick 04Status des logs :07 %logchan.status notice $nick 04Couleur des événements : $+ %logchan.couleur.event Couleur notice $nick 04Couleur des décorations : $+ %logchan.couleur.deco Couleur notice $nick 04Couleur du texte : $+ %logchan.couleur.text Couleur } if ($2 == salon) { if ($3 == $null || $3 == aide || $3 == help) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Configurer Salon 07]=' notice $nick 04Pour configurer un salon :07 !logchan salon <#TonSalon> } else { part %logchan.salon set %logchan.salon $3 notice $nick 07'=[ 04LogChan By Diims 07:: 04Configurer Salon 07]=' notice $nick 04Salon de log Configuré :07 %logchan.salon join %logchan.salon set %logchan.status On } } if ($2 == status) { if (%logchan.salon == $null) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Status 07]=' notice $nick 4Avant d'activer ou désactiver les logs, il faut configurer un Salon. notice $nick 04Pour configurer un salon :07 !logchan salon <#TonSalon> } else { if ($3 == $null || $3 == aide || $3 == help) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Status 07]=' notice $nick 04Pour activer ou désactiver l'affichage des logs :07 !logchan status <on/off> } if ($3 == on) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Status 07]=' notice $nick 04Activation de l'affichage de logs. set %logchan.status On notice $nick 04Status des logs :07 %logchan.status notice $nick 04Salon des logs :07 %logchan.salon } if ($3 == off) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Status 07]=' notice $nick 04Déctivation de l'affichage de logs. set %logchan.status Off notice $nick 04Status des logs :07 %logchan.status } } } if ($2 == couleur) { if ($3 == $null || $3 == aide || $3 == help) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' notice $nick 04Pour configurer les couleurs :07 !logchan couleur <event|deco|text> <code couleur> } if ($3 == event) { if ($4 == $null) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' notice $nick 04Pour configurer les couleurs :07 !logchan couleur <event|deco|text> <code couleur> } else { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' set %logchan.couleur.event $4 notice $nick 04Couleur des événements : $+ %logchan.couleur.event Couleur } } if ($3 == deco) { if ($4 == $null) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' notice $nick 04Pour configurer les couleurs :07 !logchan couleur <event|deco|text> <code couleur> } else { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' set %logchan.couleur.deco $4 notice $nick 04Couleur des décorations : $+ %logchan.couleur.deco Couleur } } if ($3 == text) { if ($4 == $null) { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' notice $nick 04Pour configurer les couleurs :07 !logchan couleur <event|deco|text> <code couleur> } else { notice $nick 07'=[ 04LogChan By Diims 07:: 04Couleurs 07]=' set %logchan.couleur.text $4 notice $nick 04Couleur du texte : $+ %logchan.couleur.text Couleur } } } } } } On *:LOAD:{ echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04-------------------------------------------------------------------------------- echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04L'instalation s'est effectuée avec succès. echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Veuillez repondre aux informations demandées. dialog -m logchan logchan echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Tu as parfaitement configuré le Script. echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04Bon ammusement ! echo -a $+ $time $+ 07'=[ 04LogChan by Diims 07]=' 04-------------------------------------------------------------------------------- }

Conclusion :


Ceci est la première source que je dépose sur ce site ..

Comme je suis débutant .. il me reste encore énormément de choses à apprendre, j'en suis concient, donc toutes vos critiques/remarques sont les bienvenues, du moment qu'elles sont constructives.

Merci à tous.

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.