Une fois l'addon chargé dans un bot il suffit qu'une personne tape !tapavu <pseudo> pour que le bot lui dise si il la vu, si oui, si elle a déco, ou changé de pseudo etc..
c'est assez connu comme addon mais bon.. :)
voici la version avec hashtable
Source / Exemple :
on 1:start:{
hmake tapavu 100
hload tapavu tapavutemp.txt
}
on 1:part:#:{
hadd tapavu $nick $+ . $+ $chan $address($nick,2) $ctime
}
on 1:quit:{
hadd tapavu $nick $+ .quit $address($nick,2) $ctime $1-
}
on 1:nick:{
hadd tapavu $nick $+ .nick $address($newnick,2) $ctime $newnick
}
on 1:text:!tapavu*:#:{
if (!$2) { msg $chan j'ai pas vu qui ? }
elseif ($2 == $me) { msg $chan je suis la :oÞ }
elseif ($2 == $nick) { msg $chan Arretes de te moquer de moi :( }
elseif ($2) {
if ($2 ison $chan) { msg $chan Il(elle) est là ! Ouvres tes yeux ;) }
else {
if ($hget(tapavu,$2 $+ . $+ $chan)) {
var %cb2 $ctime - $gettok($hget(tapavu,$2 $+ . $+ $chan),2,32)
msg $chan $2 ( $+ $gettok$hget(tapavu,$2 $+ . $+ $chan),1,32) $+ ) est parti de $chan il y a : $duration(%cb2)
halt
}
if ($hget(tapavu,$2 $+ .quit)) {
var %cb2 $ctime - $gettok($hget(tapavu,$2 $+ .quit),2,32)
msg $chan $2 ( $+ $gettok($hget(tapavu,$2 $+ .quit),1,32) $+ ) a quitté l'IRC il y a : $duration(%cb2) pour la raison suivante : $gettok($hget(tapavu,$2 $+ .quit),3-,32)
halt
}
if ($hget(tapavu,$2 $+ .nick)) {
var %cb2 $ctime - $gettok($hget(tapavu,$2 $+ .nick),2,32)
msg $chan $2 ( $+ $gettok($hget(tapavu,$2 $+ .nick),1,32) $+ ) a changé son pseudo en $gettok($hget(tapavu,$2 $+ .nick),3,32) il y a : $duration(%cb2)
halt
}
else {
msg $chan je n'ai pas vu $2 ici
whois $2
hadd -m whois nick $2
hadd -m whois chan $chan
enable #whoisTapavu
}
}
}
}
#whoisTapavu off
raw 319:*:msg $hget(whois,chan) Mais $hget(whois,nick) est sur: $3- | disable #whoisTapavu
raw 401:*:msg $hget(whois,chan) $hget(whois,nick) n'est pas connecté(e) actuellement. | disable #whoisTapavu
raw 318:*:disable #whoisTapavu
#whoisTapavu end
on 1:disconnect:{
hsave tapavu tapavutemp.txt
}
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.