- Home»
- Cod sursa: SYESTEME DE VOTE POUR WEBRADIO
SYESTEME DE VOTE POUR WEBRADIO
SYESTEME DE VOTE POUR WEBRADIO
Voila un petit script pour ceux qui on un stream privé et qui veulent instauré un systeème de vote sur lec chansons qui passent. Il n`est pas parfait, c`est sur. Mais il requiert que le titre qui joue actuellement soit mentionné dans un fichier texte. Certain logiciels le permettent donc regarde
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| BLKoldSUN | Cyrilpop | games | Cod testat | 550 | 2024-08-30 08:02:14 |
ON *:TEXT:!*:#:{
if ($1 == !top) { %bonus = 1 }
if ($1 == !megatop) { %bonus = 2 }
if ($1 == !flop) { %bonus = -1 }
if ($1 == !megaflop) { %bonus = -2 }
if ($1 == !top || $1 == !megatop || $1 == !flop || $1 == !megaflop) {
%votant = $address($nick,5)
%titre = $read(now.txt)
!.echo -q $read(top.txt,w,& %titre)
%ligne.titre = $readn
!.echo -q $read(votants.txt,w,%votant)
%ligne.votant = $readn
if (%ligne.votant == 0 && %ligne.titre == 0) {
%points = 0
%existe = non
}
if (%ligne.topflop == 0) {
%points = $calc($gettok($read(top.txt,%ligne.titre),1,32) + %bonus)
if (%existe == $null) {
write -l $+ %ligne.titre top.txt %points %titre
}
else {
write top.txt %points %titre
}
write votants.txt %votant
notice $nick 7,1 Merci d'avoir donné ton avis sur : 15,1 %titre 11 le titre a %points points
unset %existe
}
else {
notice $nick 7,1 Désolé, mais 4,1un seul vote par chanson...
}
}
}
}
IRC Snippets