voila ceci est un script qui n'est pas de moi, je ne me rappel plus de qui il est mais je le remerci.
ce script permet d'envoyer un reply a une personne qui demande a etre pinger avec a cote une barre de couleur en fonction du ping qu'il a.
plus le ping est bas plus la barre est verte, plus le ping est haut plus elle est rouge ( avec degrade )
Source / Exemple :
on *:text:!pingme:#: {
.ctcp $nick ping
set %pingchan $chan
set %pingnick $nick
}
on *:text:!ping*:#: {
if ($2 == $null) || ($2 = me) {
.ctcp $nick ping
set %pingchan $chan
set %pingnick $nick
}
if ($2 != $null) {
ctcp $2 ping
set %pingchan $chan
set %pingnick $2
}
}
on *:ctcpreply:*ping*: {
set %pingy $calc($ctime - $2)
if (%pingy == 0) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1 000 Seconds 15 }
if (%pingy == 1) { /notice %pingnick Ping Reply 0,1 %pingnick 9,115,1 001 Second 15 }
if (%pingy == 2) { /notice %pingnick Ping Reply 0,1 %pingnick 9,115,1 002 Seconds 15 }
if (%pingy == 3) { /notice %pingnick Ping Reply 0,1 %pingnick 9,115,1 003 Seconds 15 }
if (%pingy == 4) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1815,1 004 Seconds 15 }
if (%pingy == 5) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1815,1 005 Seconds 15 }
if (%pingy == 6) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1815,1 006 Seconds 15 }
if (%pingy == 7) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1815,1 007 Seconds 15 }
if (%pingy == 8) { /notice %pingnick Ping Reply 0,1 %pingnick 9,18715,1 008 Seconds 15 }
if (%pingy == 9) { /notice %pingnick Ping Reply 0,1 %pingnick 9,18715,1 009 Seconds 15 }
if (%pingy == 10) { /notice %pingnick Ping Reply 0,1 %pingnick 9,18715,1 0010 Seconds 15 }
if (%pingy == 11) { /notice %pingnick Ping Reply 0,1 %pingnick 9,18715,1 0011 Seconds 15 }
if (%pingy == 12) { /notice %pingnick Ping Reply 0,1 %pingnick 9,187415,1 0012 Seconds 15 }
if (%pingy == 13) { /notice %pingnick Ping Reply 0,1 %pingnick 9,187415,1 0013 Seconds 15 }
if (%pingy == 14) { /notice %pingnick Ping Reply 0,1 %pingnick 9,187415,1 0014 Seconds 15 }
if (%pingy == 15) { /notice %pingnick Ping Reply 0,1 %pingnick 9,187415,1 0015 Seconds 15 }
if (%pingy > 15) { /notice %pingnick Ping Reply 0,1 %pingnick 4,1 00Over 15 Seconds 15 }
}
Conclusion :
%pingchan = au nom du canal ou la personne a taper !ping
%pingnick = le nom de la personne qui a demande a etre pinger
juste que la tout va bien :p
set %pingy $calc($ctime - $2) ceci calcul le ping de la personne qui a demande le ping
et le if (%pingy == 0) { /notice %pingnick Ping Reply 0,1 %pingnick 9,1 000 Seconds 15 }
test la variable %pingypour savoir si elle est == a 0 ( autrement dit si le ping est de 0 ) il envois le message /notice %pingnick Ping Reply 0,1 %pingnick a la personne et les sont la barre et les couleur a y mettre selon le ping de la personne ...
ainsi de suite
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.