begin process at 2012 02 12 00:50:53
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

AddOns

 > TOP10 - STATS

TOP10 - STATS


 Information sur la source

Note :
Aucune note
Catégorie :AddOns Niveau :Débutant Date de création :20/05/2003 Date de mise à jour :20/05/2003 12:31:39 Vu :4 236

Auteur : Knox

Ecrire un message privé
Commentaire sur cette source (8)
Ajouter un commentaire et/ou une note

 Description

un !top10 pour irc - facile et tout ca dans les remotes

Source

  • #KnoxTop
  • on *:load: {
  • mkdir knoxtop
  • mkdir knoxtop\mots
  • mkdir knoxtop\lettres
  • mkdir knoxtop\sourires
  • mkdir knoxtop\rang
  • }
  • on *:text:*:#: {
  • writeini -n $+(knoxtop\rang\,$chan,.ini) $nick rang $calc($readini($+(knoxtop\rang\,$chan,.ini),$nick,rang) + $numtok($1-,32))
  • writeini -n $+(knoxtop\mots\,$chan,.ini) $nick mots $calc($readini($+(knoxtop\mots\,$chan,.ini),$nick,mots) + $numtok($1-,32))
  • writeini -n $+(knoxtop\lettres\,$chan,.ini) $nick lettres $calc($readini($+(knoxtop\lettres\,$chan,.ini),$nick,lettres) + $len($remove($1-,$chr(32))))
  • writeini -n $+(knoxtop\sourires\,$chan,.ini) $nick sourires $calc($readini($+(knoxtop\sourires\,$chan,.ini),$nick,sourires) + $regex($1-,/(\:|;)(-)?(P|X|D|\/|\\|\[|\])/ig) + $count($1-,: $+ $chr(40),:- $+ $chr(40),: $+ $chr(41),:- $+ $chr(41),; $+ $chr(40),;- $+ $chr(40),; $+ $chr(41),;- $+ $chr(41)))
  • if ($1- = !top10 || ($1 = !top10 && $2- = mots)) {
  • msg $chan $knoxtop($chan,mots)
  • }
  • elseif ($1 = !top10 && $2- = sourires) {
  • msg $chan $knoxtop($chan,sourires)
  • }
  • elseif ($1 = !top10 && $2- = lettres) {
  • msg $chan $knoxtop($chan,lettres)
  • }
  • elseif ($1- = !stat) {
  • msg $chan $statlist($chan,$nick)
  • }
  • elseif ($1 = !stat && $numtok($2-,32) = 1) {
  • msg $chan $statlist($chan,$2-)
  • }
  • elseif ($1- = !rang) {
  • msg $chan $ranglist($chan,$nick)
  • }
  • elseif ($1 = !rang && $numtok($2-,32) = 1) {
  • msg $chan $ranglist($chan,$2-)
  • }
  • elseif ($1 = !aide) {
  • notice $nick commandes de knox top; !top10 °mots°lettres°sourires°, !stat °nick°, !rang °nick°
  • }
  • }
  • on *:join:#: {
  • .timer $+ $+($chan,$nick) 0 1 inc % [ $+ [ $chan ] [ $+ . $+ [ $nick ] ] ]
  • }
  • on *:part:#: {
  • .timer $+ $+($chan,$nick) off
  • }
  • on *:quit: {
  • var %x = 1
  • while ($comchan($nick,%x)) {
  • .timer $+ $+($ifmatch,$nick) off
  • inc %x
  • }
  • }
  • on *:kick:#: {
  • .timer $+ $+($chan,$nick) off
  • }
  • alias knoxtop {
  • var %.h = $iif($2 = mots,mots,$iif($2 = lettres,lettres,$iif($2 = sourires,sourires))), %.a = $+(knoxtop\,%.h,\,$1,.ini), %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),$2), %.d = 1, %.e = $ini(%.a,%.b), %.f = 1
  • :loop
  • while (%.b <= $ini(%.a,0)) {
  • if ($readini(%.a,$ini(%.a,$calc(%.b + 1)),$2) > %.c) {
  • var %.c = $ifmatch, %.e = $ini(%.a,$calc(%.b + 1))
  • }
  • inc %.b
  • }
  • var %.g = $addtok(%.g,$+($ord(%.f),.,$chr(32),%.e,$chr(40),%.c,$chr(41)),32)
  • writeini -n $+(temp,%.h,.ini) %.e %.h %.c
  • remini %.a %.e
  • if ($ini(%.a,0) > 0 && %.f < 10) {
  • var %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),$2), %.e = $ini(%.a,%.b)
  • inc %.f
  • goto loop
  • }
  • while (%.d <= $ini($+(temp,%.h,.ini),0)) {
  • writeini -n %.a $ini($+(temp,%.h,.ini),%.d) %.h $readini($+(temp,%.h,.ini),$ini($+(temp,%.h,.ini),%.d),%.h)
  • inc %.d
  • }
  • .remove $+(temp,%.h,.ini)
  • return $+(Top10,$chr(40),$upper($left($2,1)),$lower($right($2,-1)),$chr(41),:) %.g
  • }
  • alias ranglist {
  • .remove knoxnicks.txt
  • var %.a = $+(knoxtop\rang\,$1,.ini), %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),rang), %.d = 1, %.e = $ini(%.a,%.b), %.f = 1
  • :loop
  • while (%.b <= $ini(%.a,0)) {
  • if ($readini(%.a,$ini(%.a,$calc(%.b + 1)),rang) > %.c) {
  • var %.c = $readini(%.a,$ini(%.a,$calc(%.b + 1)),rang), %.e = $ini(%.a,$calc(%.b + 1))
  • }
  • inc %.b
  • }
  • write knoxnicks.txt %.e
  • writeini -n temp.ini %.e rang %.c
  • remini %.a %.e
  • if ($ini(%.a,0) > 0) {
  • var %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),rang), %.e = $ini(%.a,%.b)
  • inc %.f
  • goto loop
  • }
  • while (%.d <= $ini(temp.ini,0)) {
  • writeini -n %.a $ini(temp.ini,%.d) rang $readini(temp.ini,$ini(temp.ini,%.d),rang)
  • inc %.d
  • }
  • .remove temp.ini
  • var %x = 1
  • while (%x <= $lines(sortnicks.txt)) {
  • if ($2 = $read(sortnicks.txt,%x)) {
  • return $2 votre rang est $chr(35) $+ $readn de $ini(%.a,0) personnes ! bravo Lâche pas :P
  • }
  • inc %x
  • }
  • return Knoxtop, n'as aucune information au sujet de $2 sur $1
  • }
  • alias statlist {
  • if ($readini($+(knoxtop\mots\,$1,.ini),$2,mots)) {
  • return $2 $+ : $readini($+(knoxtop\mots\,$1,.ini),$2,mots) mots, $readini($+(knoxtop\lettres\,$1,.ini),$2,lettres) lettres, $readini($+(knoxtop\sourires\,$1,.ini),$2,sourires) sourires, temps passé: $rerang($duration(% [ $+ [ $1 ] [ $+ . $+ [ $2 ] ] ]),sec,$chr(32) $+ seconde,min,$chr(32) $+ minute,hr,$chr(32) $+ heures,jour,$chr(32) $+ jour,wk,$chr(32) $+ semaines) $iif(!% [ $+ [ $1 ] [ $+ . $+ [ $2 ] ] ],0 secondes)
  • }
  • else {
  • return Knoxtop, n'as aucune information au sujet de $2 sur $1
  • }
  • }
  • #KnoxTop END
#KnoxTop
on *:load: {
  mkdir knoxtop
  mkdir knoxtop\mots
  mkdir knoxtop\lettres
  mkdir knoxtop\sourires
  mkdir knoxtop\rang
}
on *:text:*:#: {
  writeini -n $+(knoxtop\rang\,$chan,.ini) $nick rang $calc($readini($+(knoxtop\rang\,$chan,.ini),$nick,rang) + $numtok($1-,32))
  writeini -n $+(knoxtop\mots\,$chan,.ini) $nick mots $calc($readini($+(knoxtop\mots\,$chan,.ini),$nick,mots) + $numtok($1-,32))
  writeini -n $+(knoxtop\lettres\,$chan,.ini) $nick lettres $calc($readini($+(knoxtop\lettres\,$chan,.ini),$nick,lettres) + $len($remove($1-,$chr(32)))) 
  writeini -n $+(knoxtop\sourires\,$chan,.ini) $nick sourires $calc($readini($+(knoxtop\sourires\,$chan,.ini),$nick,sourires) + $regex($1-,/(\:|;)(-)?(P|X|D|\/|\\|\[|\])/ig) + $count($1-,: $+ $chr(40),:- $+ $chr(40),: $+ $chr(41),:- $+ $chr(41),; $+ $chr(40),;- $+ $chr(40),; $+ $chr(41),;- $+ $chr(41)))
  if ($1- = !top10 || ($1 = !top10 && $2- = mots)) {
    msg $chan $knoxtop($chan,mots)
  }
  elseif ($1 = !top10 && $2- = sourires) {
    msg $chan $knoxtop($chan,sourires)
  }
  elseif ($1 = !top10 && $2- = lettres) {
    msg $chan $knoxtop($chan,lettres)
  }
  elseif ($1- = !stat) {
    msg $chan $statlist($chan,$nick)
  }
  elseif ($1 = !stat && $numtok($2-,32) = 1) {
    msg $chan $statlist($chan,$2-)
  }
  elseif ($1- = !rang) {
    msg $chan $ranglist($chan,$nick)
  }
  elseif ($1 = !rang && $numtok($2-,32) = 1) {
    msg $chan $ranglist($chan,$2-)
  }
  elseif ($1 = !aide) {
    notice $nick commandes de knox top; !top10 °mots°lettres°sourires°, !stat °nick°, !rang °nick°
  }
}
on *:join:#: {
  .timer $+ $+($chan,$nick) 0 1 inc % [ $+ [ $chan ] [ $+ . $+ [ $nick ] ] ]
}
on *:part:#: {
  .timer $+ $+($chan,$nick) off
}
on *:quit: {
  var %x = 1
  while ($comchan($nick,%x)) {
    .timer $+ $+($ifmatch,$nick) off
    inc %x
  }
}
on *:kick:#: {
  .timer $+ $+($chan,$nick) off
}
alias knoxtop {
  var %.h = $iif($2 = mots,mots,$iif($2 = lettres,lettres,$iif($2 = sourires,sourires))), %.a = $+(knoxtop\,%.h,\,$1,.ini), %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),$2), %.d = 1, %.e = $ini(%.a,%.b), %.f = 1
  :loop
  while (%.b <= $ini(%.a,0)) {
    if ($readini(%.a,$ini(%.a,$calc(%.b + 1)),$2) > %.c) {
      var %.c = $ifmatch, %.e = $ini(%.a,$calc(%.b + 1))
    }
    inc %.b
  }
  var %.g = $addtok(%.g,$+($ord(%.f),.,$chr(32),%.e,$chr(40),%.c,$chr(41)),32) 
  writeini -n $+(temp,%.h,.ini) %.e %.h %.c
  remini %.a %.e
  if ($ini(%.a,0) > 0 && %.f < 10) {
    var %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),$2), %.e = $ini(%.a,%.b)
    inc %.f    
    goto loop
  }
  while (%.d <= $ini($+(temp,%.h,.ini),0)) {
    writeini -n %.a $ini($+(temp,%.h,.ini),%.d) %.h $readini($+(temp,%.h,.ini),$ini($+(temp,%.h,.ini),%.d),%.h)
    inc %.d
  }
  .remove $+(temp,%.h,.ini)
  return $+(Top10,$chr(40),$upper($left($2,1)),$lower($right($2,-1)),$chr(41),:) %.g
}
alias ranglist {
  .remove knoxnicks.txt
  var %.a = $+(knoxtop\rang\,$1,.ini), %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),rang), %.d = 1, %.e = $ini(%.a,%.b), %.f = 1
  :loop
  while (%.b <= $ini(%.a,0)) {
    if ($readini(%.a,$ini(%.a,$calc(%.b + 1)),rang) > %.c) {
      var %.c = $readini(%.a,$ini(%.a,$calc(%.b + 1)),rang), %.e = $ini(%.a,$calc(%.b + 1))
    }
    inc %.b
  }
  write knoxnicks.txt %.e
  writeini -n temp.ini %.e rang %.c
  remini %.a %.e
  if ($ini(%.a,0) > 0) {
    var %.b = 1, %.c = $readini(%.a,$ini(%.a,%.b),rang), %.e = $ini(%.a,%.b)
    inc %.f    
    goto loop
  }
  while (%.d <= $ini(temp.ini,0)) {
    writeini -n %.a $ini(temp.ini,%.d) rang $readini(temp.ini,$ini(temp.ini,%.d),rang)
    inc %.d
  }
  .remove temp.ini
  var %x = 1
  while (%x <= $lines(sortnicks.txt)) {
    if ($2 = $read(sortnicks.txt,%x)) {
      return $2 votre rang est $chr(35) $+ $readn de $ini(%.a,0) personnes ! bravo Lâche pas :P
    }
    inc %x
  }
  return Knoxtop, n'as aucune information au sujet de $2 sur $1
}
alias statlist {
  if ($readini($+(knoxtop\mots\,$1,.ini),$2,mots)) {
    return $2 $+ : $readini($+(knoxtop\mots\,$1,.ini),$2,mots) mots, $readini($+(knoxtop\lettres\,$1,.ini),$2,lettres) lettres, $readini($+(knoxtop\sourires\,$1,.ini),$2,sourires) sourires, temps passé: $rerang($duration(% [ $+ [ $1 ] [ $+ . $+ [ $2 ] ] ]),sec,$chr(32) $+ seconde,min,$chr(32) $+ minute,hr,$chr(32) $+ heures,jour,$chr(32) $+ jour,wk,$chr(32) $+ semaines) $iif(!% [ $+ [ $1 ] [ $+ . $+ [ $2 ] ] ],0 secondes)
  }
  else {
    return Knoxtop, n'as aucune information au sujet de $2 sur $1
  }
}
#KnoxTop END

 Conclusion

!top10 mots
!top10 lettres
!top10 sourires
!stat nick
!rang nick
!aide


 Sources de la même categorie

PACMAN MULTI-JOUEUR EN LIGNE par wims
PROXY&SOCKS SCANNER+LEECHER par independentt
GESTIONNAIRE DE HIGHLIGHT AVANCÉ AVEC IGNORE SALON OU PSEUDO par doob666
AUTOJOIN HTABLE MULTISERVER par doob666
TCL - AJOUT SUPPRESSION DE LOGS par Atok

Commentaires et avis

Commentaire de Knox le 20/05/2003 15:11:03

Blah Bleh Blih Bloh Bluh

Commentaire de Knox le 20/05/2003 15:24:06

Jfait un autre test ... Bleh2
[img]http://66.28.32.123/netfu/tmp10024/coollogo_com_296902772.gif[/img]

Commentaire de Knox le 20/05/2003 15:25:13

Admin!! pourriez vous effacé les 2 message si dessus :P cétais un petit test =P

Commentaire de funnyscript le 22/07/2003 18:42:27

ben il fon pas les stats ca ecri sa =&gt;

/writeini: insufficient parameters (line 10, script1.ini)

Commentaire de Panther007 le 28/08/2004 02:56:27

Euh jtrouve sa super le top10 des mots !!! mais y a un pb. .... c que quand on écrit !stat...... sa écrit exemple :
Panther: 665 mots, 2992 lettres, 18 sourires, temps passé: 0 secondes ...... le pb est ...... Le temp passer ??? sa reste toujour a 0 jcomprend pas...

Commentaire de InFerNaLeX le 21/10/2004 10:26:44

ouais bah moi quand j'ecris !stat ben il fait rien du tout.comment ca marche ô/ô,ou bien ca marche pas ?

Commentaire de InFerNaLeX le 21/10/2004 10:28:22

je viens de remarqué qu'en fait ici ca repond jamais :x

Commentaire de InFerNaLeX le 21/10/2004 10:28:53

je viens de remarqué qu'en fait ici ca repond jamais :x

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,983 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales